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
230e65df
Commit
230e65df
authored
Feb 17, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added func
parent
772be409
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
89 deletions
+77
-89
dev.php
dist/dev.php
+1
-1
zh-cn.js
lang/zh-cn/zh-cn.js
+11
-10
dialog.js
src/adapter/dialog.js
+40
-59
modal.js
src/ui/modal.js
+6
-9
buttonicon.css
themes/default/_css/buttonicon.css
+1
-4
dialog.css
themes/default/_css/dialog.css
+18
-6
No files found.
dist/dev.php
View file @
230e65df
...
@@ -59,7 +59,7 @@ $dependency = Array(
...
@@ -59,7 +59,7 @@ $dependency = Array(
,
'src/adapter/combobox.js'
,
'src/adapter/combobox.js'
,
'src/adapter/saveto.js'
,
'src/adapter/saveto.js'
,
'src/adapter/hand.js'
,
'src/adapter/hand.js'
,
'src/adapter/
icon
.js'
,
'src/adapter/
dialog
.js'
,
'src/protocal/plain.js'
,
'src/protocal/plain.js'
,
'src/protocal/json.js'
,
'src/protocal/json.js'
);
);
...
...
lang/zh-cn/zh-cn.js
View file @
230e65df
...
@@ -9,23 +9,24 @@ KityMinder.LANG[ 'zh-cn' ] = {
...
@@ -9,23 +9,24 @@ KityMinder.LANG[ 'zh-cn' ] = {
'fontsize'
:
'字号'
,
'fontsize'
:
'字号'
,
'layoutstyle'
:
'主题'
,
'layoutstyle'
:
'主题'
,
'saveto'
:
'导出'
,
'saveto'
:
'导出'
,
'hand'
:
'允许拖拽'
'hand'
:
'允许拖拽'
,
'markers'
:
'添加标签'
},
},
'popupcolor'
:
{
'popupcolor'
:
{
'clearColor'
:
'清空颜色'
,
'clearColor'
:
'清空颜色'
,
'standardColor'
:
'标准颜色'
,
'standardColor'
:
'标准颜色'
,
'themeColor'
:
'主题颜色'
'themeColor'
:
'主题颜色'
},
},
'dialogs'
:{
'dialogs'
:
{
'markers'
:{
'markers'
:
{
'static'
:{
'static'
:
{
'lang_input_text'
:
'文本内容:'
,
'lang_input_text'
:
'文本内容:'
,
'lang_input_url'
:
'链接地址:'
,
'lang_input_url'
:
'链接地址:'
,
'lang_input_title'
:
'标题:'
,
'lang_input_title'
:
'标题:'
,
'lang_input_target'
:
'是否在新窗口打开:'
'lang_input_target'
:
'是否在新窗口打开:'
},
},
'validLink'
:
'只支持选中一个链接时生效'
,
'validLink'
:
'只支持选中一个链接时生效'
,
'httpPrompt'
:
'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
'httpPrompt'
:
'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
}
}
}
}
...
...
src/adapter/dialog.js
View file @
230e65df
KM
.
registerUI
(
'markers'
,
function
(
name
)
{
KM
.
registerUI
(
'markers'
,
function
(
name
)
{
var
me
=
this
,
currentRange
,
$dialog
,
var
me
=
this
,
currentRange
,
$dialog
,
opt
=
{
opt
=
{
title
:
this
.
getLang
(
'tooltips'
)[
name
]
||
''
,
title
:
this
.
getLang
(
'tooltips'
)[
name
]
||
''
,
url
:
me
.
getOptions
(
'KITYMINDER_HOME_URL'
)
+
'dialogs/'
+
name
+
'/'
+
name
+
'.js'
url
:
me
.
getOptions
(
'KITYMINDER_HOME_URL'
)
+
'dialogs/'
+
name
+
'/'
+
name
+
'.js'
,
};
};
var
$btn
=
$
.
kmuibutton
({
var
$btn
=
$
.
kmuibutton
(
{
icon
:
name
,
icon
:
name
,
title
:
this
.
getLang
(
'tooltips'
)[
name
]
||
''
title
:
this
.
getLang
(
'tooltips'
)[
name
]
||
''
});
}
);
//加载模版数据
//加载模版数据
utils
.
loadFile
(
document
,
{
utils
.
loadFile
(
document
,
{
src
:
opt
.
url
,
src
:
opt
.
url
,
tag
:
"script"
,
tag
:
"script"
,
type
:
"text/javascript"
,
type
:
"text/javascript"
,
defer
:
"defer"
defer
:
"defer"
},
function
(){
},
function
()
{
//调整数据
var
data
=
KM
.
getWidgetData
(
name
);
if
(
data
.
buttons
){
var
ok
=
data
.
buttons
.
ok
;
if
(
ok
){
opt
.
oklabel
=
ok
.
label
||
me
.
getLang
(
'ok'
);
if
(
ok
.
exec
){
opt
.
okFn
=
function
(){
return
$
.
proxy
(
ok
.
exec
,
null
,
me
,
$dialog
)()
}
}
}
var
cancel
=
data
.
buttons
.
cancel
;
if
(
cancel
){
opt
.
cancellabel
=
cancel
.
label
||
me
.
getLang
(
'cancel'
);
if
(
cancel
.
exec
){
opt
.
cancelFn
=
function
(){
return
$
.
proxy
(
cancel
.
exec
,
null
,
me
,
$dialog
)()
}
}
}
}
data
.
width
&&
(
opt
.
width
=
data
.
width
);
data
.
height
&&
(
opt
.
height
=
data
.
height
);
$dialog
=
$
.
kmuimodal
(
opt
);
$dialog
.
attr
(
'id'
,
'kmui-dialog-'
+
name
).
addClass
(
'kmui-dialog-'
+
name
)
.
find
(
'.kmui-modal-body'
).
addClass
(
'kmui-dialog-'
+
name
+
'-body'
);
$dialog
.
kmui
().
on
(
'beforeshow'
,
function
()
{
$dialog
=
$
.
kmuimodal
(
opt
);
var
$root
=
this
.
root
(),
win
=
null
,
offset
=
null
;
if
(
!
$root
.
parent
()[
0
])
{
$dialog
.
attr
(
'id'
,
'kmui-dialog-'
+
name
).
addClass
(
'kmui-dialog-'
+
name
)
me
.
$container
.
find
(
'.kmui-dialog-container'
).
append
(
$root
);
.
find
(
'.kmui-modal-body'
).
addClass
(
'kmui-dialog-'
+
name
+
'-body'
);
}
KM
.
setWidgetBody
(
name
,
$dialog
,
me
);
}).
on
(
'afterbackdrop'
,
function
(){
$dialog
.
kmui
().
on
(
'beforeshow'
,
function
()
{
this
.
$backdrop
.
css
(
'zIndex'
,
me
.
getOptions
(
'zIndex'
)
+
1
).
appendTo
(
me
.
$container
.
find
(
'.kmui-dialog-container'
))
var
$root
=
this
.
root
(),
$dialog
.
css
(
'zIndex'
,
me
.
getOptions
(
'zIndex'
)
+
2
)
win
=
null
,
}).
attachTo
(
$btn
)
offset
=
null
;
});
if
(
!
$root
.
parent
()[
0
]
)
{
me
.
$container
.
find
(
'.kmui-dialog-container'
).
append
(
$root
);
}
me
.
on
(
'interactchange'
,
function
()
{
KM
.
setWidgetBody
(
name
,
$dialog
,
me
);
var
state
=
this
.
queryCommandState
(
name
);
$dialog
.
on
(
"click"
,
"#icon-priority li"
,
function
()
{
$btn
.
kmui
().
disabled
(
state
==
-
1
).
active
(
state
==
1
)
var
$this
=
$
(
this
);
});
var
val
=
$this
.
val
();
me
.
execCommand
(
"changeicon"
,
"PriorityIcon"
,
val
);
}
).
on
(
"click"
,
"#icon-progress li"
,
function
()
{
var
$this
=
$
(
this
);
var
val
=
$this
.
val
();
me
.
execCommand
(
"changeicon"
,
"ProgressIcon"
,
val
);
}
);
}
).
attachTo
(
$btn
)
}
);
me
.
on
(
'interactchange'
,
function
()
{
var
state
=
this
.
queryCommandState
(
name
);
$btn
.
kmui
().
disabled
(
state
==
-
1
).
active
(
state
==
1
)
}
);
return
$btn
;
return
$btn
;
});
}
);
\ No newline at end of file
\ No newline at end of file
src/ui/modal.js
View file @
230e65df
...
@@ -5,16 +5,13 @@ KM.ui.define( 'modal', {
...
@@ -5,16 +5,13 @@ KM.ui.define( 'modal', {
'<div class="kmui-close" data-hide="modal"></div>'
+
'<div class="kmui-close" data-hide="modal"></div>'
+
'<h3 class="kmui-title"><%=title%></h3>'
+
'<h3 class="kmui-title"><%=title%></h3>'
+
'</div>'
+
'</div>'
+
'<div class="kmui-modal-body" style="<%if(width){%>width:<%=width%>px;<%}%>'
+
'<div>'
+
'<%if(height){%>height:<%=height%>px;<%}%>">'
+
'<h3>优先级</h3>'
+
' </div>'
+
'<ul class="icon-list" id="icon-priority"><li value="1">1</li><li value="2">2</li><li value="3">3</li><li value="4">4</li><li value="5">5</li></ul>'
+
'<% if(cancellabel || oklabel) {%>'
+
'<h3>进程</h3>'
+
'<div class="kmui-modal-footer">'
+
'<ul class="icon-list" id="icon-progress"><li value="1">1</li><li value="2">2</li><li value="3">3</li><li value="4">4</li><li value="5">5</li></ul>'
+
'<div class="kmui-modal-tip"></div>'
+
'<%if(oklabel){%><div class="kmui-btn kmui-btn-primary" data-ok="modal"><%=oklabel%></div><%}%>'
+
'<%if(cancellabel){%><div class="kmui-btn" data-hide="modal"><%=cancellabel%></div><%}%>'
+
'</div>'
+
'</div>'
+
'<
%}%><
/div>'
,
'</div>'
,
defaultOpt
:
{
defaultOpt
:
{
title
:
""
,
title
:
""
,
cancellabel
:
""
,
cancellabel
:
""
,
...
...
themes/default/_css/buttonicon.css
View file @
230e65df
...
@@ -17,9 +17,6 @@
...
@@ -17,9 +17,6 @@
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-hand
{
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-hand
{
background
:
url(../images/hand.png)
no-repeat
2px
2px
;
background
:
url(../images/hand.png)
no-repeat
2px
2px
;
}
}
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-
flag
{
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-
markers
{
background
:
url(../images/flag.png)
no-repeat
2px
2px
;
background
:
url(../images/flag.png)
no-repeat
2px
2px
;
}
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-clock
{
background
:
url(../images/clock.png)
no-repeat
2px
2px
;
}
}
\ No newline at end of file
themes/default/_css/dialog.css
View file @
230e65df
.kmui-modal
{
.kmui-modal
{
position
:
fixed
;
position
:
fixed
;
_position
:
absolute
;
top
:
10px
;
top
:
10%
;
right
:
10px
;
left
:
50%
;
border
:
1px
solid
#acacac
;
box-shadow
:
2px
2px
5px
#d3d6da
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
outline
:
0
;
outline
:
0
;
border-radius
:
5px
;
box-shadow
:
3px
3px
8px
rgba
(
0
,
0
,
0
,
.5
);
}
}
.kmui-modal-header
{
.kmui-modal-header
{
padding
:
5px
10px
;
padding
:
5px
10px
;
...
@@ -79,4 +78,17 @@
...
@@ -79,4 +78,17 @@
height
:
30px
;
height
:
30px
;
line-height
:
30px
;
line-height
:
30px
;
display
:
none
;
display
:
none
;
}
}
\ No newline at end of file
.icon-list
{
margin
:
0
;
padding
:
0
}
.icon-list
li
{
padding
:
10px
20px
;
margin
:
0
;
list-style
:
none
;
cursor
:
pointer
;
}
.icon-list
li
:hover
{
background
:
#cfe0f7
}
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