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
b4235ed3
Commit
b4235ed3
authored
May 08, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed style
parent
635f2491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
12 deletions
+41
-12
hyperlink.js
dialogs/hyperlink/hyperlink.js
+41
-12
No files found.
dialogs/hyperlink/hyperlink.js
View file @
b4235ed3
(
function
()
{
//todo 这里先写死成中文
var
content
=
'<div class="hyperlink-content" style="padding:20px;width:360px;">'
;
content
+=
'<p><label>输入链接: <input id="hyperlink_href" style="width:90%;" /></label></p>'
;
content
+=
'<p style="text-align:right"><button id="hyperlink_insert">插入</button></p>'
;
content
+=
'<style>'
;
content
+=
'.kmui-dialog-<%= container %> input{'
;
content
+=
'width: 75%;'
;
content
+=
'padding: 6px 12px;'
;
content
+=
'font-size: 14px;'
;
content
+=
'line-height: 1.42857143;'
;
content
+=
'color: #555;'
;
content
+=
'background-color: #fff;'
;
content
+=
'background-image: none;'
;
content
+=
'border: 1px solid #ccc;'
;
content
+=
'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content
+=
'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,'
;
content
+=
'box-shadow ease-in-out .15s;'
;
content
+=
'transition: border-color ease-in-out .15s,'
;
content
+=
'box-shadow ease-in-out .15s;'
;
content
+=
'}'
;
content
+=
'.kmui-dialog-<%= container %> input:focus{'
;
content
+=
'border-color: #66afe9;'
;
content
+=
'outline: 0;'
;
content
+=
'-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);'
;
content
+=
'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);'
;
content
+=
'}'
;
content
+=
'.kmui-dialog-<%= container %> button{'
;
content
+=
'height:34px;'
;
content
+=
'line-height:34px;'
;
content
+=
'vertical-align:1px'
;
content
+=
'}'
;
content
+=
'</style>'
;
content
+=
'<input id="hyperlink_href"/>'
;
content
+=
'<button id="hyperlink_insert">插入</button>'
;
content
+=
'</div>'
;
KM
.
registerWidget
(
'hyperlink'
,
{
tpl
:
content
,
initContent
:
function
(
km
)
{
var
lang
=
km
.
getLang
(
'dialogs.hyperlink'
),
html
;
if
(
lang
)
{
html
=
$
.
parseTmpl
(
this
.
tpl
,
lang
);
html
=
$
.
parseTmpl
(
this
.
tpl
,
utils
.
extend
(
{
'container'
:
'hyperlink'
},
lang
)
);
}
this
.
root
().
html
(
html
);
},
initEvent
:
function
(
km
,
$w
)
{
$w
.
find
(
'#hyperlink_insert'
).
on
(
'click'
,
function
()
{
km
.
execCommand
(
'hyperlink'
,
$w
.
find
(
'#hyperlink_href'
).
val
()
);
$w
.
find
(
'#hyperlink_insert'
).
on
(
'click'
,
function
()
{
km
.
execCommand
(
'hyperlink'
,
$w
.
find
(
'#hyperlink_href'
).
val
()
);
$w
.
kmui
().
hide
();
});
var
url
=
km
.
queryCommandValue
(
'hyperlink'
);
var
$input
=
$w
.
find
(
'#hyperlink_href'
);
$input
.
val
(
url
||
'http://'
);
setTimeout
(
function
()
{
}
);
var
url
=
km
.
queryCommandValue
(
'hyperlink'
);
var
$input
=
$w
.
find
(
'#hyperlink_href'
);
$input
.
val
(
url
||
'http://'
);
setTimeout
(
function
()
{
$input
.
focus
()
})
}
)
},
width
:
400
}
);
...
...
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