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
d1282765
Commit
d1282765
authored
May 07, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化了超链接的体验
parent
b2102632
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
hyperlink.js
dialogs/hyperlink/hyperlink.js
+5
-1
hyperlink.js
src/module/hyperlink.js
+12
-2
No files found.
dialogs/hyperlink/hyperlink.js
View file @
d1282765
...
@@ -25,7 +25,11 @@
...
@@ -25,7 +25,11 @@
});
});
var
url
=
km
.
queryCommandValue
(
'hyperlink'
);
var
url
=
km
.
queryCommandValue
(
'hyperlink'
);
$w
.
find
(
'#hyperlink_href'
).
val
(
url
||
''
)
var
$input
=
$w
.
find
(
'#hyperlink_href'
);
$input
.
val
(
url
||
'http://'
);
setTimeout
(
function
(){
$input
.
focus
()
})
},
},
width
:
400
width
:
400
}
);
}
);
...
...
src/module/hyperlink.js
View file @
d1282765
...
@@ -22,7 +22,7 @@ KityMinder.registerModule( "hyperlink", function () {
...
@@ -22,7 +22,7 @@ KityMinder.registerModule( "hyperlink", function () {
}
}
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
if
(
n
&&
n
.
getData
(
'hyperlink'
)
)
{
if
(
n
&&
n
.
getData
(
'hyperlink'
)
)
{
result
=
1
;
result
=
0
;
return
false
;
return
false
;
}
}
}
);
}
);
...
@@ -51,7 +51,17 @@ KityMinder.registerModule( "hyperlink", function () {
...
@@ -51,7 +51,17 @@ KityMinder.registerModule( "hyperlink", function () {
if
(
nodes
.
length
==
0
)
{
if
(
nodes
.
length
==
0
)
{
return
-
1
;
return
-
1
;
}
}
var
link
=
false
;
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
if
(
n
.
getData
(
'hyperlink'
)){
link
=
true
;
return
false
;
}
}
);
if
(
link
){
return
0
}
return
-
1
;
}
}
}
)
}
)
},
},
...
...
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