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
35482c03
Commit
35482c03
authored
Oct 20, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加文件移动功能
parent
327f7577
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1132 additions
and
151 deletions
+1132
-151
Gruntfile.js
Gruntfile.js
+3
-3
import.js
import.js
+1
-1
zh-cn.js
lang/zh-cn/zh-cn.js
+3
-0
fio
lib/fio
+1
-1
default.js
ui/menu/default.js
+5
-2
local.js
ui/menu/open/local.js
+3
-5
_mainmenu.less
ui/theme/default/css/_mainmenu.less
+25
-0
_netdisk.less
ui/theme/default/css/_netdisk.less
+118
-61
default.all.css
ui/theme/default/css/default.all.css
+176
-35
default.all.css.map
ui/theme/default/css/default.all.css.map
+1
-1
Mindmanager.svg
ui/theme/default/images/Mindmanager.svg
+24
-0
finder.svg
ui/theme/default/images/finder.svg
+589
-0
icons.png
ui/theme/default/images/icons.png
+0
-0
netdiskfinder.js
ui/widget/netdiskfinder.js
+183
-42
No files found.
Gruntfile.js
View file @
35482c03
...
...
@@ -150,13 +150,13 @@ module.exports = function(grunt) {
less
:
{
compile
:
{
files
:
{
'ui/theme/default/css/default.all.css'
:
[
'ui/theme/default/css/default.all.
temp.
css'
:
[
'ui/theme/default/css/import.less'
]
},
options
:
{
sourceMap
:
true
,
sourceMapFilename
:
'ui/theme/default/css/default.all.css.map'
,
sourceMapFilename
:
'ui/theme/default/css/default.all.
temp.
css.map'
,
sourceMapBasepath
:
'ui/theme/default/css/'
}
}
...
...
@@ -167,7 +167,7 @@ module.exports = function(grunt) {
options
:
{
map
:
true
},
src
:
'ui/theme/default/css/default.all.css'
,
src
:
'ui/theme/default/css/default.all.
temp.
css'
,
dest
:
'ui/theme/default/css/default.all.css'
}
}
...
...
import.js
View file @
35482c03
...
...
@@ -129,11 +129,11 @@
{
path
:
'ui/widget/commandbuttonset.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/commandinputmenu.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/commandselectmenu.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/notice.js'
,
pack
:
'edit|share|m-share'
},
{
path
:
'ui/widget/friendlytimespan.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/locallist.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/netdiskfinder.js'
,
pack
:
'edit'
},
{
path
:
'ui/widget/menutab.js'
,
pack
:
'edit|share|m-share'
},
{
path
:
'ui/widget/notice.js'
,
pack
:
'edit|share|m-share'
},
/* 基本业务 */
{
path
:
'ui/doc.js'
,
pack
:
'edit|share|m-share'
},
...
...
lang/zh-cn/zh-cn.js
View file @
35482c03
...
...
@@ -56,6 +56,7 @@ KityMinder.LANG['zh-cn'] = {
'err_ls'
:
'读取目录失败'
,
'err_share_data'
:
'加载分享内容出错'
,
'err_share_sync_fail'
:
'分享内容同步失败'
,
'err_move_file'
:
'文件移动失败'
,
'unknownreason'
:
'可能是外星人篡改了代码...'
,
'pcs_code'
:
{
...
...
@@ -135,6 +136,7 @@ KityMinder.LANG['zh-cn'] = {
'error_detail'
:
'详细信息'
,
'copy_and_feedback'
:
'复制并反馈'
,
'move_file_confirm'
:
'确定把 "{0}" 移动到 "{1}" 吗?'
,
'command'
:
{
'appendsiblingnode'
:
'插入同级主题'
,
...
...
@@ -249,6 +251,7 @@ KityMinder.LANG['zh-cn'] = {
'fileformat'
:
'保存格式'
,
'save'
:
'保存'
,
'mkdir'
:
'新建目录'
,
'recycle'
:
'回收站'
,
'newdir'
:
'未命名目录'
,
'bold'
:
'加粗'
,
...
...
fio
@
8a1fe1e0
Subproject commit
af5b1072aa358004f8eed3fc426bdc61627634d5
Subproject commit
8a1fe1e02a0ae7b3440a80182b899fc8bcd71c23
ui/menu/default.js
View file @
35482c03
...
...
@@ -18,10 +18,13 @@ KityMinder.registerUI('menu/default', function(minder) {
var
$draft
=
minder
.
getUI
(
'menu/open/draft'
);
setMenuDefaults
();
loadLandingFile
();
// $menu.show();
// $menu.$tabs.select(5);
// $menu.$tabs.select(1);
// $open.$tabs.select(1);
// return;
loadLandingFile
();
function
setMenuDefaults
()
{
// 主菜单默认选中「打开」
...
...
ui/menu/open/local.js
View file @
35482c03
...
...
@@ -72,14 +72,12 @@ KityMinder.registerUI('menu/open/local', function(minder) {
},
false
);
cwrapper
.
addEventListener
(
'drop'
,
function
(
e
)
{
if
(
e
.
dataTransfer
.
files
.
length
)
{
e
.
preventDefault
();
if
(
!
$doc
.
checkSaved
())
return
;
if
(
e
.
dataTransfer
.
files
.
length
)
{
read
(
e
.
dataTransfer
.
files
[
0
]);
}
$menu
.
hide
();
}
},
false
);
function
read
(
domfile
)
{
...
...
ui/theme/default/css/_mainmenu.less
View file @
35482c03
...
...
@@ -268,9 +268,34 @@
}
}
animation: slideRight 0.3s ease;
animation-fill-mode: backward;
animation-direction: reverse;
&.fui-hide {
animation-fill-mode: forward;
animation-direction: normal;
}
}
}
}
}
}
}
@keyframes slideLeft {
}
@keyframes slideRight {
0% {
transform: translate(0, 0);
opacity: 1;
display: block !important;
}
100% {
transform: translate(50px, 0);
opacity: 0;
display: none !important;
}
}
\ No newline at end of file
ui/theme/default/css/_netdisk.less
View file @
35482c03
.netdisk-finder-container {
.netdisk-nav {
@keyframes shake {
0% { transform: translate(0, 0); }
15% { transform: translate(-2px, -2px); }
35% { transform: translate(2px, -2px);}
65% { transform: translate(-2px, 2px); }
85% { transform: translate(2px, 2px); }
100% { transform: translate(0, 0); }
}
.netdisk-finder {
.dir.drag-enter {
border: 1px dashed #717B94 !important;
background: #F9F9F9;
}
&.drop-mode {
.dir {
animation: shake .3s ease;
}
.recycle {
animation: shake .3s ease;
}
}
.head {
padding-bottom: 10px;
height: 30px;
border-bottom: 1px solid #eee;
.control {
float: right;
.mkdir {
}
.button {
vertical-align: middle;
font-size: 0;
background: url(../images/finder.svg) no-repeat;
box-sizing: border-box;
width: 30px;
height: 30px;
border-radius: 2px;
border: 1px solid transparent;
&.recycle {
background-position: -30px 0;
&.drag-enter {
background-position: -60px 0 !important;
}
}
&:hover {
border: 1px solid lighten(#717B94, 30%);
}
&:active {
box-shadow: inset 0 1px 3px fadeOut(#717B94, 80%);
}
}
}
.nav {
font-size: 18px;
span, a {
...
...
@@ -45,6 +99,7 @@
}
a {
border: 1px solid transparent;
&:hover {
background-color: lighten(@tab-hover, 55%);
}
...
...
@@ -53,14 +108,13 @@
}
}
}
}
.
netdisk-
file-list {
.file-list {
margin: 0;
padding: 0;
list-style: none;
.dock(40px, 0, 0);
overflow: auto;
.empty {
height: 50px;
line-height: 50px;
...
...
@@ -68,14 +122,17 @@
font-size: 18px;
color: #ccc;
}
.
netdisk-
file-list-item {
.file-list-item {
font-size: 14px;
line-height: 20px;
padding: 10px 20px 10px 40px;
cursor: default;
-webkit-user-drag: element;
-khtml-user-drag: element;
border: 1px solid transparent;
&:hover {
background-color: lighten(@tab-hover, 55%);
/* background-color: lighten(@tab-hover, 55%); */
}
&:active {
background-color: lighten(@tab-hover, 50%);
...
...
@@ -83,14 +140,22 @@
&.selected {
background-color: lighten(@tab-active, 20%);
color: white;
&.file:before {
background-position: 0 -545px;
&.dir .icon {
background: lighten(@tab-active, 20%) url(../images/icons.png) 0 -1085px;
}
&.dir:after {
border-left-color: white;
}
&.file .icon {
background: lighten(@tab-active, 20%) url(../images/icons.png) 0 -545px;
}
}
&.dragging {
border: 1px solid #717B94;
}
&.file {
position: relative;
&:before {
content: ' ';
.icon {
display: block;
position: absolute;
width: 25px;
...
...
@@ -102,8 +167,7 @@
}
&.dir {
position: relative;
&:before {
content: ' ';
.icon {
display: block;
position: absolute;
width: 25px;
...
...
@@ -127,13 +191,6 @@
}
}
}
.netdisk-mkdir {
position: absolute;
right: 0;
top: 0;
}
}
// for save
...
...
ui/theme/default/css/default.all.css
View file @
35482c03
...
...
@@ -1749,6 +1749,12 @@ body {
bottom
:
0
;
left
:
40px
;
/* 面板内容 */
-webkit-animation
:
slideRight
0.3s
ease
;
animation
:
slideRight
0.3s
ease
;
-webkit-animation-fill-mode
:
backward
;
animation-fill-mode
:
backward
;
-webkit-animation-direction
:
reverse
;
animation-direction
:
reverse
;
}
#main-menu
.main-menu-level1
>
.fui-tabs-panel-wrap
>
.fui-panel
>
.fui-panel-content
{
position
:
absolute
;
...
...
@@ -1839,6 +1845,46 @@ body {
margin
:
0
;
padding-left
:
38px
;
}
#main-menu
.main-menu-level1
>
.fui-tabs-panel-wrap
>
.fui-panel.fui-hide
{
-webkit-animation-fill-mode
:
forward
;
animation-fill-mode
:
forward
;
-webkit-animation-direction
:
normal
;
animation-direction
:
normal
;
}
@-webkit-keyframes
slideLeft
{
}
@keyframes
slideLeft
{
}
@-webkit-keyframes
slideRight
{
0
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
opacity
:
1
;
display
:
block
!important
;
}
100
%
{
-webkit-transform
:
translate
(
50px
,
0
);
transform
:
translate
(
50px
,
0
);
opacity
:
0
;
display
:
none
!important
;
}
}
@keyframes
slideRight
{
0
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
opacity
:
1
;
display
:
block
!important
;
}
100
%
{
-webkit-transform
:
translate
(
50px
,
0
);
transform
:
translate
(
50px
,
0
);
opacity
:
0
;
display
:
none
!important
;
}
}
.new-file-template-select
{
margin
:
0
;
padding
:
0
;
...
...
@@ -2319,14 +2365,106 @@ body {
font-size
:
12px
;
color
:
#999
;
}
.netdisk-finder-container
.netdisk-nav
{
@-webkit-keyframes
shake
{
0
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
}
15
%
{
-webkit-transform
:
translate
(
-2px
,
-2px
);
transform
:
translate
(
-2px
,
-2px
);
}
35
%
{
-webkit-transform
:
translate
(
2px
,
-2px
);
transform
:
translate
(
2px
,
-2px
);
}
65
%
{
-webkit-transform
:
translate
(
-2px
,
2px
);
transform
:
translate
(
-2px
,
2px
);
}
85
%
{
-webkit-transform
:
translate
(
2px
,
2px
);
transform
:
translate
(
2px
,
2px
);
}
100
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
}
}
@keyframes
shake
{
0
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
}
15
%
{
-webkit-transform
:
translate
(
-2px
,
-2px
);
transform
:
translate
(
-2px
,
-2px
);
}
35
%
{
-webkit-transform
:
translate
(
2px
,
-2px
);
transform
:
translate
(
2px
,
-2px
);
}
65
%
{
-webkit-transform
:
translate
(
-2px
,
2px
);
transform
:
translate
(
-2px
,
2px
);
}
85
%
{
-webkit-transform
:
translate
(
2px
,
2px
);
transform
:
translate
(
2px
,
2px
);
}
100
%
{
-webkit-transform
:
translate
(
0
,
0
);
transform
:
translate
(
0
,
0
);
}
}
.netdisk-finder
.dir.drag-enter
{
border
:
1px
dashed
#717B94
!important
;
background
:
#F9F9F9
;
}
.netdisk-finder.drop-mode
.dir
{
-webkit-animation
:
shake
.3s
ease
;
animation
:
shake
.3s
ease
;
}
.netdisk-finder.drop-mode
.recycle
{
-webkit-animation
:
shake
.3s
ease
;
animation
:
shake
.3s
ease
;
}
.netdisk-finder
.head
{
padding-bottom
:
10px
;
height
:
30px
;
border-bottom
:
1px
solid
#eee
;
}
.netdisk-finder
.head
.control
{
float
:
right
;
}
.netdisk-finder
.head
.control
.button
{
vertical-align
:
middle
;
font-size
:
0
;
background
:
url(../images/finder.svg)
no-repeat
;
-moz-box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
30px
;
height
:
30px
;
border-radius
:
2px
;
border
:
1px
solid
transparent
;
}
.netdisk-finder
.head
.control
.button.recycle
{
background-position
:
-30px
0
;
}
.netdisk-finder
.head
.control
.button.recycle.drag-enter
{
background-position
:
-60px
0
!important
;
}
.netdisk-finder
.head
.control
.button
:hover
{
border
:
1px
solid
#c8ccd6
;
}
.netdisk-finder
.head
.control
.button
:active
{
box-shadow
:
inset
0
1px
3px
rgba
(
113
,
123
,
148
,
0.2
);
}
.netdisk-finder
.head
.nav
{
font-size
:
18px
;
}
.netdisk-finder
-container
.netdisk-
nav
span
,
.netdisk-finder
-container
.netdisk-
nav
a
{
.netdisk-finder
.head
.
nav
span
,
.netdisk-finder
.head
.
nav
a
{
display
:
inline-block
;
height
:
20px
;
line-height
:
20px
;
...
...
@@ -2335,7 +2473,7 @@ body {
cursor
:
default
;
vertical-align
:
middle
;
}
.netdisk-finder
-container
.netdisk-
nav
span
.my-document
{
.netdisk-finder
.head
.
nav
span
.my-document
{
width
:
25px
;
height
:
25px
;
padding
:
0
;
...
...
@@ -2344,7 +2482,7 @@ body {
top
:
-2px
;
background
:
url(../images/icons.png)
0
-470px
;
}
.netdisk-finder
-container
.netdisk-
nav
a
.dir-back
{
.netdisk-finder
.head
.
nav
a
.dir-back
{
border-radius
:
100%
;
width
:
23px
;
height
:
23px
;
...
...
@@ -2355,7 +2493,7 @@ body {
top
:
-1px
;
background
:
url(../images/icons.png)
-2px
-396px
no-repeat
;
}
.netdisk-finder
-container
.netdisk-
nav
span
.spliter
{
.netdisk-finder
.head
.
nav
span
.spliter
{
content
:
' '
;
display
:
block
;
width
:
0
;
...
...
@@ -2370,54 +2508,63 @@ body {
display
:
inline-block
;
margin-left
:
4px
;
}
.netdisk-finder-container
.netdisk-nav
a
:hover
{
.netdisk-finder
.head
.nav
a
{
border
:
1px
solid
transparent
;
}
.netdisk-finder
.head
.nav
a
:hover
{
background-color
:
#f4f5f7
;
}
.netdisk-finder
-container
.netdisk-
nav
a
:active
{
.netdisk-finder
.head
.
nav
a
:active
{
background-color
:
#d7dae1
;
}
.netdisk-finder
-container
.netdisk-
file-list
{
.netdisk-finder
.
file-list
{
margin
:
0
;
padding
:
0
;
list-style
:
none
;
position
:
absolute
;
top
:
40px
;
right
:
0
;
bottom
:
0
;
left
:
0
;
overflow
:
auto
;
}
.netdisk-finder
-container
.netdisk-
file-list
.empty
{
.netdisk-finder
.
file-list
.empty
{
height
:
50px
;
line-height
:
50px
;
text-align
:
center
;
font-size
:
18px
;
color
:
#ccc
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item
{
.netdisk-finder
.file-list
.
file-list-item
{
font-size
:
14px
;
line-height
:
20px
;
padding
:
10px
20px
10px
40px
;
cursor
:
default
;
-webkit-user-drag
:
element
;
-khtml-user-drag
:
element
;
border
:
1px
solid
transparent
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item
:hover
{
background-color
:
#f4f5f7
;
.netdisk-finder
.file-list
.
file-list-item
:hover
{
/* background-color: lighten(@tab-hover, 55%); */
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item
:active
{
.netdisk-finder
.file-list
.
file-list-item
:active
{
background-color
:
#e5e7ec
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item.selected
{
.netdisk-finder
.file-list
.
file-list-item.selected
{
background-color
:
#717b94
;
color
:
white
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-file-list-item.selected.file
:before
{
background
-position
:
0
-54
5px
;
.netdisk-finder
.file-list
.file-list-item.selected.dir
.icon
{
background
:
#717b94
url(../images/icons.png)
0
-108
5px
;
}
.netdisk-finder-container
.netdisk-file-list
.netdisk-file-list-item.file
{
.netdisk-finder
.file-list
.file-list-item.selected.dir
:after
{
border-left-color
:
white
;
}
.netdisk-finder
.file-list
.file-list-item.selected.file
.icon
{
background
:
#717b94
url(../images/icons.png)
0
-545px
;
}
.netdisk-finder
.file-list
.file-list-item.dragging
{
border
:
1px
solid
#717B94
;
}
.netdisk-finder
.file-list
.file-list-item.file
{
position
:
relative
;
}
.netdisk-finder-container
.netdisk-file-list
.netdisk-file-list-item.file
:before
{
content
:
' '
;
.netdisk-finder
.file-list
.file-list-item.file
.icon
{
display
:
block
;
position
:
absolute
;
width
:
25px
;
...
...
@@ -2426,11 +2573,10 @@ body {
top
:
7px
;
background
:
url(../images/icons.png)
0
-445px
no-repeat
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item.dir
{
.netdisk-finder
.file-list
.
file-list-item.dir
{
position
:
relative
;
}
.netdisk-finder-container
.netdisk-file-list
.netdisk-file-list-item.dir
:before
{
content
:
' '
;
.netdisk-finder
.file-list
.file-list-item.dir
.icon
{
display
:
block
;
position
:
absolute
;
width
:
25px
;
...
...
@@ -2439,7 +2585,7 @@ body {
top
:
7px
;
background
:
url(../images/icons.png)
0
-420px
no-repeat
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item.dir
:after
{
.netdisk-finder
.file-list
.
file-list-item.dir
:after
{
content
:
' '
;
display
:
block
;
width
:
0
;
...
...
@@ -2456,16 +2602,11 @@ body {
top
:
20px
;
margin-top
:
-4px
;
}
.netdisk-finder
-container
.netdisk-file-list
.netdisk-
file-list-item.dir
input
{
.netdisk-finder
.file-list
.
file-list-item.dir
input
{
margin
:
0
;
outline
:
none
;
width
:
61.80%
;
}
.netdisk-finder-container
.netdisk-mkdir
{
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.netdisk-save-panel
.netdisk-file-list
{
bottom
:
50px
;
}
...
...
ui/theme/default/css/default.all.css.map
View file @
35482c03
This diff is collapsed.
Click to expand it.
ui/theme/default/images/Mindmanager.svg
0 → 100644
View file @
35482c03
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"25px"
height=
"25px"
viewBox=
"0 0 25 25"
style=
"enable-background:new 0 0 25 25;"
xml:space=
"preserve"
>
<g
id=
"图层_2"
>
<path
style=
"fill:#3A4859;"
d=
"M6.196,24c1.062,0,6.493-3,12.605,0h5.94C24.853,24,25,24.359,25,24.247V2.112
C25,2,24.853,2,24.741,2h-7.869L5.981,24H6.196z"
/>
</g>
<g
id=
"图层_1"
>
<path
style=
"fill:#474D54;"
d=
"M18.905,24L8.038,2H0.169C0.057,2,0,2,0,2.112v22.135C0,24.359,0.057,24,0.169,24h6.027
c1.062,0,6.493-3,12.605,0H18.905z"
/>
</g>
<g
id=
"图层_2_x5F_复制"
>
</g>
<g
id=
"图层_1_x5F_复制"
>
<path
style=
"fill:#2C363F;"
d=
"M5.981,24h0.215c1.062,0,6.493-3,12.605,0h0.103L12.45,10.611L5.981,24z"
/>
</g>
<g
id=
"图层_3"
style=
"display:none;"
>
<image
style=
"display:inline;overflow:visible;"
width=
"512"
height=
"512"
xlink:href=
"754EB0E7B73A025C.png"
transform=
"matrix(0.9999 0 0 0.9999 -243 -243)"
>
</image>
</g>
</svg>
ui/theme/default/images/finder.svg
0 → 100644
View file @
35482c03
This diff is collapsed.
Click to expand it.
ui/theme/default/images/icons.png
View replaced file @
327f7577
View file @
35482c03
19.9 KB
|
W:
|
H:
20.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/widget/netdiskfinder.js
View file @
35482c03
This diff is collapsed.
Click to expand it.
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