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
37fe2751
Commit
37fe2751
authored
Oct 09, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release-1.3.0' into release-1.3.0
parents
4647bebe
f1b00e74
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
99 additions
and
39 deletions
+99
-39
download.php
download.php
+4
-1
event.js
src/core/event.js
+4
-2
editor.js
src/module/editor.js
+1
-0
expand.js
src/module/expand.js
+6
-1
png.js
src/protocol/png.js
+5
-6
download.js
ui/menu/save/download.js
+3
-1
netdisk.js
ui/menu/save/netdisk.js
+8
-4
resource.js
ui/ribbon/idea/resource.js
+7
-2
_public.less
ui/theme/default/css/_public.less
+1
-0
_resource_panel.less
ui/theme/default/css/_resource_panel.less
+2
-1
_share.less
ui/theme/default/css/_share.less
+1
-1
_widgets.less
ui/theme/default/css/_widgets.less
+8
-0
default.all.css
ui/theme/default/css/default.all.css
+11
-3
default.all.css.map
ui/theme/default/css/default.all.css.map
+1
-1
user.js
ui/topbar/user.js
+1
-1
netdiskfinder.js
ui/widget/netdiskfinder.js
+36
-15
No files found.
download.php
View file @
37fe2751
...
...
@@ -20,11 +20,14 @@ if (isset($_REQUEST['content'])) {
if
(
!
$filename
)
{
$filename
=
"kikyminder"
;
}
if
(
isset
(
$_REQUEST
[
'iehack'
]))
{
$filename
=
urlencode
(
$filename
);
}
header
(
"Content-type: application/octet-stream; charset=utf8; name="
.
urlencode
(
$filename
));
header
(
"Accept-Length: "
.
strlen
(
$content
));
header
(
"Content-Length: "
.
strlen
(
$content
));
header
(
"Content-Disposition: attachment; filename="
.
urlencode
(
$filename
)
);
header
(
"Content-Disposition: attachment; filename="
.
$filename
);
header
(
'Content-Description: File Transfer'
);
if
(
isset
(
$_REQUEST
[
'stamp'
]))
{
...
...
src/core/event.js
View file @
37fe2751
...
...
@@ -20,7 +20,9 @@ var MinderEvent = kity.createClass('MindEvent', {
while
(
!
findShape
.
minderNode
&&
findShape
.
container
)
{
findShape
=
findShape
.
container
;
}
return
findShape
.
minderNode
||
null
;
var
node
=
findShape
.
minderNode
;
if
(
node
&&
findShape
.
getOpacity
()
<
1
)
return
null
;
return
node
||
null
;
},
stopPropagation
:
function
()
{
...
...
@@ -151,7 +153,7 @@ kity.extendClass(Minder, {
callbacks
[
i
].
call
(
this
,
e
);
/* this.getStatus() != lastStatus ||*/
if
(
e
.
shouldStopPropagationImmediately
())
{
break
;
}
...
...
src/module/editor.js
View file @
37fe2751
...
...
@@ -70,6 +70,7 @@ KityMinder.registerModule('TextEditModule', function() {
'normal.beforemousedown textedit.beforemousedown inputready.beforemousedown'
:
function
(
e
)
{
//右键直接退出
if
(
e
.
isRightMB
())
{
if
(
!
e
.
getTargetNode
())
this
.
setStatus
(
'normal'
);
return
;
}
...
...
src/module/expand.js
View file @
37fe2751
...
...
@@ -76,6 +76,10 @@ KityMinder.registerModule('Expand', function() {
if
(
!
changed
)
return
;
node
.
renderTree
().
getMinder
().
layout
(
100
);
/* 如何加展开效果:
var vo = node.getVertexOut();
if (state == STATE_EXPAND) {
...
...
@@ -99,6 +103,7 @@ KityMinder.registerModule('Expand', function() {
});
}
*/
}
// 将展开的操作和状态读取接口拓展到 MinderNode 上
...
...
src/protocol/png.js
View file @
37fe2751
...
...
@@ -61,14 +61,13 @@ if (!kity.Browser.ie) {
// svg 含有 符号导出报错 Entity 'nbsp' not defined
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
//
blob = new Blob([svgXml], {
//
type: 'image/svg+xml'
//
});
blob
=
new
Blob
([
svgXml
],
{
type
:
'image/svg+xml'
});
//
svgUrl = DomURL.createObjectURL(blob);
svgUrl
=
DomURL
.
createObjectURL
(
blob
);
svgUrl
=
'data:image/svg+xml;charset=utf-8,'
+
encodeURIComponent
(
svgXml
);
//svgUrl = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svgXml);
return
{
width
:
width
,
...
...
ui/menu/save/download.js
View file @
37fe2751
...
...
@@ -118,7 +118,9 @@ KityMinder.registerUI('menu/save/download', function(minder) {
value
:
filename
}).
appendTo
(
$form
);
$
(
'<input name="iehack" value="☠" />'
).
appendTo
(
$form
);
if
(
kity
.
Browser
.
ie
)
{
$
(
'<input name="iehack" value="1" />'
).
appendTo
(
$form
);
}
$
(
'<input name="stamp" />'
).
val
(
stamp
).
appendTo
(
$form
);
var
netdisk
=
minder
.
getUI
(
'menu/save/netdisk'
);
...
...
ui/menu/save/netdisk.js
View file @
37fe2751
...
...
@@ -123,7 +123,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
var
$title
=
minder
.
getUI
(
'topbar/title'
).
$title
;
$filename
.
val
(
doc
.
title
);
return
doSave
(
doc
.
path
,
doc
.
protocol
,
doc
,
$title
);
return
doSave
(
doc
.
path
,
doc
.
protocol
,
doc
,
$title
,
'leaveTheMenu'
);
}
function
getSaveContext
()
{
...
...
@@ -162,7 +162,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
var
saving
=
0
;
function
doSave
(
path
,
protocol
,
doc
,
$mask
)
{
function
doSave
(
path
,
protocol
,
doc
,
$mask
,
leaveTheMenu
)
{
if
(
saving
)
return
;
...
...
@@ -202,7 +202,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
if
(
$mask
)
$mask
.
removeClass
(
'loading'
);
if
(
!
leaveTheMenu
)
{
$menu
.
hide
();
}
doc
.
path
=
path
;
doc
.
title
=
$filename
.
val
();
...
...
@@ -211,7 +213,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
$doc
.
save
(
doc
);
setTimeout
(
$finder
.
list
,
500
);
setTimeout
(
function
()
{
$finder
.
list
(
$finder
.
pwd
(),
true
);
},
1499
);
});
}
...
...
ui/ribbon/idea/resource.js
View file @
37fe2751
...
...
@@ -19,6 +19,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
var
$addInput
=
new
FUI
.
Input
().
appendTo
(
$resourcePanel
);
$addInput
.
getElement
().
type
=
'text'
;
var
$addButton
=
new
FUI
.
Button
({
label
:
'添加'
}).
appendTo
(
$resourcePanel
);
...
...
@@ -31,8 +33,9 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
function
addResource
()
{
var
resource
=
$addInput
.
getValue
();
var
origin
=
minder
.
queryCommandValue
(
'resource'
);
if
(
resource
)
{
if
(
!~
origin
.
indexOf
(
resource
))
origin
.
unshift
(
resource
);
if
(
/
\S
/
.
test
(
resource
))
{
if
(
!~
origin
.
indexOf
(
resource
))
origin
.
push
(
resource
);
origin
.
sort
();
minder
.
execCommand
(
'resource'
,
origin
);
}
$addInput
.
setValue
(
null
);
...
...
@@ -68,6 +71,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
var
resource
=
minder
.
queryCommandValue
(
'resource'
);
var
used
=
minder
.
getUsedResource
();
used
.
sort
();
switch
(
minder
.
queryCommandState
(
'resource'
))
{
case
0
:
$addInput
.
enable
();
...
...
ui/theme/default/css/_public.less
View file @
37fe2751
...
...
@@ -80,6 +80,7 @@ input[type=text],
input[type=url] {
padding: 2px 5px;
height: 16px;
line-height: 16px;
outline: none;
border: 1px solid lighten(@tab-hover, 50%);
box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
...
...
ui/theme/default/css/_resource_panel.less
View file @
37fe2751
#resource-panel > .fui-panel-content > .fui-label-panel-content {
position: relative;
& > .fui-input {
width: 14
8
px;
width: 14
0
px;
margin: 2px 0 0;
vertical-align: middle;
box-sizing: content-box;
}
& > .fui-button {
...
...
ui/theme/default/css/_share.less
View file @
37fe2751
...
...
@@ -195,7 +195,7 @@
}
}
.shared-content {
.left,
.right {
& > .left, & >
.right {
float: left;
}
.m-logo {
...
...
ui/theme/default/css/_widgets.less
View file @
37fe2751
...
...
@@ -9,6 +9,14 @@
}
}
input::-ms-clear {
display: none;
}
input[type=search]::-ms-clear {
display: inline-block;
}
#tab-container .fui-button {
display: inline-block;
padding: 2px 5px 2px 3px;
...
...
ui/theme/default/css/default.all.css
View file @
37fe2751
...
...
@@ -608,6 +608,7 @@ input[type=text],
input
[
type
=
url
]
{
padding
:
2px
5px
;
height
:
16px
;
line-height
:
16px
;
outline
:
none
;
border
:
1px
solid
#e5e7ec
;
box-shadow
:
inset
0
1px
3px
rgba
(
0
,
0
,
0
,
0.05
);
...
...
@@ -831,6 +832,12 @@ li {
.fui-disabled
.fui-widget
:active
{
background-color
:
transparent
;
}
input
::-ms-clear
{
display
:
none
;
}
input
[
type
=
search
]
::-ms-clear
{
display
:
inline-block
;
}
#tab-container
.fui-button
{
display
:
inline-block
;
padding
:
2px
5px
2px
3px
;
...
...
@@ -2754,9 +2761,10 @@ body {
position
:
relative
;
}
#resource-panel
>
.fui-panel-content
>
.fui-label-panel-content
>
.fui-input
{
width
:
14
8
px
;
width
:
14
0
px
;
margin
:
2px
0
0
;
vertical-align
:
middle
;
box-sizing
:
content-box
;
}
#resource-panel
>
.fui-panel-content
>
.fui-label-panel-content
>
.fui-button
{
left
:
auto
;
...
...
@@ -3180,8 +3188,8 @@ ul.resource-list li {
#public-share
.share-body
{
display
:
none
;
}
.shared-content
.left
,
.shared-content
.right
{
.shared-content
>
.left
,
.shared-content
>
.right
{
float
:
left
;
}
.shared-content
.m-logo
{
...
...
ui/theme/default/css/default.all.css.map
View file @
37fe2751
This diff is collapsed.
Click to expand it.
ui/topbar/user.js
View file @
37fe2751
...
...
@@ -66,7 +66,7 @@ KityMinder.registerUI('topbar/user', function(minder) {
window
.
open
(
'http://i.baidu.com'
);
break
;
case
'gotonetdisk'
:
window
.
open
(
'http://pan.baidu.com'
);
window
.
open
(
'http://pan.baidu.com
/disk/home#path=/apps/kityminder
'
);
break
;
case
'switchuser'
:
switchUser
();
...
...
ui/widget/netdiskfinder.js
View file @
37fe2751
...
...
@@ -11,6 +11,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
var
eve
=
minder
.
getUI
(
'eve'
);
var
instances
=
[];
/**
* 生成一个网盘的目录访问组件
*
...
...
@@ -21,6 +23,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
var
finder
=
eve
.
setup
({});
instances
.
push
(
finder
);
var
base
=
'/apps/kityminder'
;
var
currentPath
=
base
;
...
...
@@ -71,7 +75,6 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
});
});
function
mkdir
()
{
if
(
mkdir
.
onprogress
)
{
return
mkdir
.
onprogress
.
select
();
...
...
@@ -108,9 +111,13 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
fio
.
file
.
mkdir
({
path
:
currentPath
+
name
}).
then
(
function
()
{
return
list
(
currentPath
,
true
);
return
new
Promise
(
function
(
resolve
)
{
setTimeout
(
function
()
{
resolve
(
list
(
currentPath
,
true
));
},
200
);
});
},
function
(
e
)
{
if
(
e
.
message
.
indexOf
(
'31061'
)
===
0
)
{
if
(
e
.
detail
&&
e
.
detail
.
error_code
==
31061
)
{
e
.
message
=
'已存在同名目录'
;
}
window
.
alert
(
'创建目录失败:'
+
e
.
message
);
...
...
@@ -185,19 +192,9 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
});
}
function
renderList
(
values
)
{
$list
.
empty
();
var
files
=
values
[
0
];
files
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
isDir
>
b
.
isDir
)
{
return
-
1
;
}
else
if
(
a
.
isDir
==
b
.
isDir
)
{
return
a
.
createTime
>
b
.
createTime
?
-
1
:
1
;
}
else
return
1
;
});
function
renderFileList
(
files
)
{
$list
.
empty
();
if
(
!
files
.
length
)
{
$list
.
append
(
'<li class="empty" disabled="disabled">'
+
minder
.
getLang
(
'ui.emptydir'
)
+
'</li>'
);
}
else
{
...
...
@@ -213,6 +210,30 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
.
appendTo
(
$list
);
});
}
}
finder
.
_renderFileList
=
renderFileList
;
function
renderList
(
values
)
{
var
files
=
values
[
0
];
files
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
isDir
>
b
.
isDir
)
{
return
-
1
;
}
else
if
(
a
.
isDir
==
b
.
isDir
)
{
return
a
.
createTime
>
b
.
createTime
?
-
1
:
1
;
}
else
return
1
;
});
renderFileList
(
files
);
// 通知其他 finder 更新
instances
.
forEach
(
function
(
instance
)
{
if
(
instance
==
finder
)
return
;
if
(
instance
.
pwd
()
==
currentPath
)
instance
.
_renderFileList
(
files
);
});
fadeInList
();
checkSelect
();
...
...
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