Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
d53af815
Commit
d53af815
authored
Feb 18, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
f3bccfde
70fc3260
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
22 deletions
+46
-22
markers.js
dialogs/markers/markers.js
+13
-0
zh-cn.js
lang/zh-cn/zh-cn.js
+2
-0
kityminder.js
src/core/kityminder.js
+9
-10
minder.js
src/core/minder.js
+1
-1
minder.module.js
src/core/minder.module.js
+4
-4
icon.js
src/module/icon.js
+14
-4
keyboard.js
src/module/keyboard.js
+2
-2
dialogsize.css
themes/default/_css/dialogsize.css
+1
-1
No files found.
dialogs/markers/markers.js
View file @
d53af815
...
@@ -25,10 +25,23 @@
...
@@ -25,10 +25,23 @@
initEvent
:
function
(
km
,
$w
)
{
initEvent
:
function
(
km
,
$w
)
{
$w
.
on
(
"click"
,
"li"
,
function
()
{
$w
.
on
(
"click"
,
"li"
,
function
()
{
var
$this
=
$
(
this
);
var
$this
=
$
(
this
);
$this
.
siblings
().
removeClass
(
"active"
);
$this
.
toggleClass
(
"active"
);
var
val
=
$this
.
val
();
var
val
=
$this
.
val
();
if
(
!
$this
.
hasClass
(
"active"
)
)
{
val
=
null
;
}
var
type
=
$this
.
attr
(
"type"
);
var
type
=
$this
.
attr
(
"type"
);
km
.
execCommand
(
type
,
val
);
km
.
execCommand
(
type
,
val
);
}
);
}
);
km
.
on
(
'interactchange'
,
function
(
e
)
{
var
valPri
=
this
.
queryCommandValue
(
"setpriority"
);
var
valPro
=
this
.
queryCommandValue
(
"setprogress"
);
$w
.
find
(
"li[type='setpriority']"
).
removeClass
(
"active"
);
$w
.
find
(
"li[type='setpriority'][value='"
+
valPri
+
"']"
).
addClass
(
"active"
);
$w
.
find
(
"li[type='setprogress']"
).
removeClass
(
"active"
);
$w
.
find
(
"li[type='setprogress'][value='"
+
valPro
+
"']"
).
addClass
(
"active"
);
}
);
},
},
buttons
:
{
buttons
:
{
'ok'
:
{
'ok'
:
{
...
...
lang/zh-cn/zh-cn.js
View file @
d53af815
KityMinder
.
LANG
[
'zh-cn'
]
=
{
KityMinder
.
LANG
[
'zh-cn'
]
=
{
'maintopic'
:
'中心主题'
,
'topic'
:
'分支主题'
,
'tooltips'
:
{
'tooltips'
:
{
'undo'
:
'撤销'
,
'undo'
:
'撤销'
,
'redo'
:
'重做'
,
'redo'
:
'重做'
,
...
...
src/core/kityminder.js
View file @
d53af815
var
KityMinder
=
var
KityMinder
=
window
.
KM
=
window
.
KM
=
window
.
KityMinder
=
function
()
{
window
.
KityMinder
=
function
()
{
var
instanceMap
=
{},
instanceId
=
0
;
var
instanceMap
=
{},
instanceId
=
0
;
return
{
return
{
version
:
'1.0.0'
,
version
:
'1.0.0'
,
createMinder
:
function
(
renderTarget
,
options
)
{
createMinder
:
function
(
renderTarget
,
options
)
{
options
=
options
||
{};
options
=
options
||
{};
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
options
.
renderTo
=
Utils
.
isString
(
renderTarget
)
?
document
.
getElementById
(
renderTarget
)
:
renderTarget
;
var
minder
=
new
Minder
(
options
);
var
minder
=
new
Minder
(
options
);
this
.
addMinder
(
options
.
renderTo
,
minder
);
this
.
addMinder
(
options
.
renderTo
,
minder
);
return
minder
;
return
minder
;
},
},
addMinder
:
function
(
target
,
minder
)
{
addMinder
:
function
(
target
,
minder
)
{
var
id
;
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
id
=
target
;
...
@@ -20,17 +20,16 @@ var KityMinder =
...
@@ -20,17 +20,16 @@ var KityMinder =
}
}
instanceMap
[
id
]
=
minder
;
instanceMap
[
id
]
=
minder
;
},
},
getMinder
:
function
(
target
,
options
)
{
getMinder
:
function
(
target
,
options
)
{
var
id
;
var
id
;
if
(
typeof
(
target
)
===
'string'
)
{
if
(
typeof
(
target
)
===
'string'
)
{
id
=
target
;
id
=
target
;
}
else
{
}
else
{
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
}
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
},
},
//挂接多语言
//挂接多语言
LANG
:{}
LANG
:
{}
}
}
}();
}();
\ No newline at end of file
src/core/minder.js
View file @
d53af815
...
@@ -39,7 +39,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -39,7 +39,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this
.
_addRenderContainer
();
this
.
_addRenderContainer
();
this
.
_root
=
new
MinderNode
(
"Main Topic"
);
this
.
_root
=
new
MinderNode
(
this
.
getLang
().
maintopic
);
this
.
_root
.
setType
(
"root"
);
this
.
_root
.
setType
(
"root"
);
if
(
this
.
_options
.
renderTo
)
{
if
(
this
.
_options
.
renderTo
)
{
this
.
renderTo
(
this
.
_options
.
renderTo
);
this
.
renderTo
(
this
.
_options
.
renderTo
);
...
...
src/core/minder.module.js
View file @
d53af815
...
@@ -38,12 +38,12 @@ kity.extendClass( Minder, {
...
@@ -38,12 +38,12 @@ kity.extendClass( Minder, {
}
}
}
}
if
(
moduleDeals
.
defaultOptions
)
{
if
(
moduleDeals
.
defaultOptions
)
{
this
.
setDefaultOptions
(
moduleDeals
.
defaultOptions
);
this
.
setDefaultOptions
(
moduleDeals
.
defaultOptions
);
}
}
//添加模块的快捷键
//添加模块的快捷键
if
(
moduleDeals
.
addShortcutKeys
)
{
if
(
moduleDeals
.
addShortcutKeys
)
{
this
.
addShortcutKeys
(
moduleDeals
.
addShortcutKeys
)
this
.
addShortcutKeys
(
moduleDeals
.
addShortcutKeys
)
}
}
}
}
...
...
src/module/icon.js
View file @
d53af815
...
@@ -54,8 +54,13 @@ KityMinder.registerModule( "IconModule", function () {
...
@@ -54,8 +54,13 @@ KityMinder.registerModule( "IconModule", function () {
}
}
},
},
queryValue
:
function
(
km
)
{
queryValue
:
function
(
km
)
{
var
node
=
km
.
getSelectedNode
();
var
nodes
=
km
.
getSelectedNodes
();
return
node
.
getData
(
"PriorityIcon"
);
var
val
;
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
val
=
nodes
[
i
].
getData
(
"PriorityIcon"
);
if
(
val
)
break
;
}
return
val
;
}
}
};
};
}
)()
);
}
)()
);
...
@@ -70,8 +75,13 @@ KityMinder.registerModule( "IconModule", function () {
...
@@ -70,8 +75,13 @@ KityMinder.registerModule( "IconModule", function () {
}
}
},
},
queryValue
:
function
(
km
)
{
queryValue
:
function
(
km
)
{
var
node
=
km
.
getSelectedNode
();
var
nodes
=
km
.
getSelectedNodes
();
return
node
.
getData
(
"ProgressIcon"
);
var
val
;
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
val
=
nodes
[
i
].
getData
(
"ProgressIcon"
);
if
(
val
)
break
;
}
return
val
;
}
}
};
};
}
)()
);
}
)()
);
...
...
src/module/keyboard.js
View file @
d53af815
...
@@ -90,11 +90,11 @@ KityMinder.registerModule( "KeyboardModule", function () {
...
@@ -90,11 +90,11 @@ KityMinder.registerModule( "KeyboardModule", function () {
this
.
receiver
.
keydownNode
=
node
;
this
.
receiver
.
keydownNode
=
node
;
switch
(
e
.
originEvent
.
keyCode
)
{
switch
(
e
.
originEvent
.
keyCode
)
{
case
keys
.
Enter
:
case
keys
.
Enter
:
this
.
execCommand
(
'appendSiblingNode'
,
new
MinderNode
(
'Topic'
)
);
this
.
execCommand
(
'appendSiblingNode'
,
new
MinderNode
(
this
.
getLang
().
topic
)
);
e
.
preventDefault
();
e
.
preventDefault
();
break
;
break
;
case
keys
.
Tab
:
case
keys
.
Tab
:
this
.
execCommand
(
'appendChildNode'
,
new
MinderNode
(
'Topic'
)
);
this
.
execCommand
(
'appendChildNode'
,
new
MinderNode
(
this
.
getLang
().
topic
)
);
e
.
preventDefault
();
e
.
preventDefault
();
break
;
break
;
case
keys
.
Backspace
:
case
keys
.
Backspace
:
...
...
themes/default/_css/dialogsize.css
View file @
d53af815
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#333
color
:
#333
}
}
.icon-list
li
:hover
{
.icon-list
li
:hover
,
.icon-list
li
.active
{
background
:
#cfe0f7
background
:
#cfe0f7
}
}
.icon-list
li
span
.icon
{
.icon-list
li
span
.icon
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment