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
87230381
Commit
87230381
authored
Dec 18, 2013
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added queryState
parent
917d1306
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
command.js
src/core/command.js
+10
-10
kityminder.js
src/core/kityminder.js
+2
-3
index.html
testcase/index.html
+2
-0
No files found.
src/core/command.js
View file @
87230381
var
Command
=
kity
.
createClass
(
"Command"
,
{
constructor
:
function
(){
},
execute
:
function
(
minder
,
args
)
{
...
...
@@ -12,14 +12,6 @@ var Command = kity.createClass( "Command", {
},
queryState
:
function
()
{
return
0
;
},
queryValue
:
function
()
{
return
0
;
},
setContentChanged
:
function
(
val
)
{
},
...
...
@@ -35,4 +27,12 @@ var Command = kity.createClass( "Command", {
isSelectionChanged
:
function
()
{
return
false
;
}
});
\ No newline at end of file
});
Command
.
queryState
:
function
(
km
)
{
return
0
;
}
Command
.
queryValue
:
function
(
km
)
{
return
0
;
}
\ No newline at end of file
src/core/kityminder.js
View file @
87230381
...
...
@@ -55,7 +55,6 @@ kity.extendClass(KityMinder, {
if
(
moduleDealsEvents
){
for
(
var
_key
in
moduleDealsEvents
){
var
bindEvs
=
_key
.
split
(
" "
);
console
.
log
(
bindEvs
);
var
func
=
moduleDealsEvents
[
_key
];
for
(
var
_i
=
0
;
_i
<
bindEvs
.
length
;
_i
++
){
me
.
on
(
bindEvs
[
_i
],
func
);
...
...
@@ -152,11 +151,11 @@ kity.extendClass(KityMinder, {
},
queryCommandState
:
function
(
name
)
{
this
.
commands
[
name
].
queryState
(
this
);
},
queryCommandValue
:
function
(
name
)
{
this
.
commands
[
name
].
queryValue
(
this
);
}
});
...
...
testcase/index.html
View file @
87230381
...
...
@@ -25,5 +25,7 @@
KityMinder
.
registerModule
(
"defaulttest"
,
mindermoduleDefaultTest
);
var
myMinder
=
new
KityMinder
();
myMinder
.
execCommand
(
"testCommand"
,
"test1"
,
function
(){
alert
(
a
)},{
a
:
1
,
b
:
2
});
myMinder
.
queryCommandState
(
"testCommand"
);
myMinder
.
queryCommandValue
(
"testCommand"
);
</script>
</html>
\ No newline at end of file
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