Commit 35482c03 authored by techird's avatar techird

添加文件移动功能

parent 327f7577
...@@ -150,13 +150,13 @@ module.exports = function(grunt) { ...@@ -150,13 +150,13 @@ module.exports = function(grunt) {
less: { less: {
compile: { compile: {
files: { files: {
'ui/theme/default/css/default.all.css': [ 'ui/theme/default/css/default.all.temp.css': [
'ui/theme/default/css/import.less' 'ui/theme/default/css/import.less'
] ]
}, },
options: { options: {
sourceMap: true, 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/' sourceMapBasepath: 'ui/theme/default/css/'
} }
} }
...@@ -167,7 +167,7 @@ module.exports = function(grunt) { ...@@ -167,7 +167,7 @@ module.exports = function(grunt) {
options: { options: {
map: true 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' dest: 'ui/theme/default/css/default.all.css'
} }
} }
......
...@@ -129,11 +129,11 @@ ...@@ -129,11 +129,11 @@
{ path: 'ui/widget/commandbuttonset.js', pack: 'edit' }, { path: 'ui/widget/commandbuttonset.js', pack: 'edit' },
{ path: 'ui/widget/commandinputmenu.js', pack: 'edit' }, { path: 'ui/widget/commandinputmenu.js', pack: 'edit' },
{ path: 'ui/widget/commandselectmenu.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/friendlytimespan.js', pack: 'edit' },
{ path: 'ui/widget/locallist.js', pack: 'edit' }, { path: 'ui/widget/locallist.js', pack: 'edit' },
{ path: 'ui/widget/netdiskfinder.js', pack: 'edit' }, { path: 'ui/widget/netdiskfinder.js', pack: 'edit' },
{ path: 'ui/widget/menutab.js', pack: 'edit|share|m-share' }, { 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' }, { path: 'ui/doc.js', pack: 'edit|share|m-share' },
......
...@@ -56,6 +56,7 @@ KityMinder.LANG['zh-cn'] = { ...@@ -56,6 +56,7 @@ KityMinder.LANG['zh-cn'] = {
'err_ls': '读取目录失败', 'err_ls': '读取目录失败',
'err_share_data': '加载分享内容出错', 'err_share_data': '加载分享内容出错',
'err_share_sync_fail': '分享内容同步失败', 'err_share_sync_fail': '分享内容同步失败',
'err_move_file': '文件移动失败',
'unknownreason': '可能是外星人篡改了代码...', 'unknownreason': '可能是外星人篡改了代码...',
'pcs_code': { 'pcs_code': {
...@@ -135,6 +136,7 @@ KityMinder.LANG['zh-cn'] = { ...@@ -135,6 +136,7 @@ KityMinder.LANG['zh-cn'] = {
'error_detail': '详细信息', 'error_detail': '详细信息',
'copy_and_feedback': '复制并反馈', 'copy_and_feedback': '复制并反馈',
'move_file_confirm': '确定把 "{0}" 移动到 "{1}" 吗?',
'command': { 'command': {
'appendsiblingnode': '插入同级主题', 'appendsiblingnode': '插入同级主题',
...@@ -249,6 +251,7 @@ KityMinder.LANG['zh-cn'] = { ...@@ -249,6 +251,7 @@ KityMinder.LANG['zh-cn'] = {
'fileformat': '保存格式', 'fileformat': '保存格式',
'save': '保存', 'save': '保存',
'mkdir': '新建目录', 'mkdir': '新建目录',
'recycle': '回收站',
'newdir': '未命名目录', 'newdir': '未命名目录',
'bold': '加粗', 'bold': '加粗',
......
Subproject commit af5b1072aa358004f8eed3fc426bdc61627634d5 Subproject commit 8a1fe1e02a0ae7b3440a80182b899fc8bcd71c23
...@@ -18,10 +18,13 @@ KityMinder.registerUI('menu/default', function(minder) { ...@@ -18,10 +18,13 @@ KityMinder.registerUI('menu/default', function(minder) {
var $draft = minder.getUI('menu/open/draft'); var $draft = minder.getUI('menu/open/draft');
setMenuDefaults(); setMenuDefaults();
loadLandingFile();
// $menu.show(); // $menu.show();
// $menu.$tabs.select(5); // $menu.$tabs.select(1);
// $open.$tabs.select(1);
// return;
loadLandingFile();
function setMenuDefaults() { function setMenuDefaults() {
// 主菜单默认选中「打开」 // 主菜单默认选中「打开」
......
...@@ -72,14 +72,12 @@ KityMinder.registerUI('menu/open/local', function(minder) { ...@@ -72,14 +72,12 @@ KityMinder.registerUI('menu/open/local', function(minder) {
}, false); }, false);
cwrapper.addEventListener('drop', function(e) { cwrapper.addEventListener('drop', function(e) {
if (e.dataTransfer.files.length) {
e.preventDefault(); e.preventDefault();
if (!$doc.checkSaved()) return; if (!$doc.checkSaved()) return;
if (e.dataTransfer.files.length) {
read(e.dataTransfer.files[0]); read(e.dataTransfer.files[0]);
}
$menu.hide(); $menu.hide();
}
}, false); }, false);
function read(domfile) { function read(domfile) {
......
...@@ -268,9 +268,34 @@ ...@@ -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
.netdisk-finder-container { @keyframes shake {
.netdisk-nav { 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; padding-bottom: 10px;
height: 30px; height: 30px;
border-bottom: 1px solid #eee; 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; font-size: 18px;
span, a { span, a {
...@@ -45,6 +99,7 @@ ...@@ -45,6 +99,7 @@
} }
a { a {
border: 1px solid transparent;
&:hover { &:hover {
background-color: lighten(@tab-hover, 55%); background-color: lighten(@tab-hover, 55%);
} }
...@@ -53,14 +108,13 @@ ...@@ -53,14 +108,13 @@
} }
} }
} }
}
.netdisk-file-list { .file-list {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
.dock(40px, 0, 0);
overflow: auto; overflow: auto;
.empty { .empty {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
...@@ -68,14 +122,17 @@ ...@@ -68,14 +122,17 @@
font-size: 18px; font-size: 18px;
color: #ccc; color: #ccc;
} }
.netdisk-file-list-item { .file-list-item {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
padding: 10px 20px 10px 40px; padding: 10px 20px 10px 40px;
cursor: default; cursor: default;
-webkit-user-drag: element;
-khtml-user-drag: element;
border: 1px solid transparent;
&:hover { &:hover {
background-color: lighten(@tab-hover, 55%); /* background-color: lighten(@tab-hover, 55%); */
} }
&:active { &:active {
background-color: lighten(@tab-hover, 50%); background-color: lighten(@tab-hover, 50%);
...@@ -83,14 +140,22 @@ ...@@ -83,14 +140,22 @@
&.selected { &.selected {
background-color: lighten(@tab-active, 20%); background-color: lighten(@tab-active, 20%);
color: white; color: white;
&.file:before { &.dir .icon {
background-position: 0 -545px; 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 { &.file {
position: relative; position: relative;
&:before { .icon {
content: ' ';
display: block; display: block;
position: absolute; position: absolute;
width: 25px; width: 25px;
...@@ -102,8 +167,7 @@ ...@@ -102,8 +167,7 @@
} }
&.dir { &.dir {
position: relative; position: relative;
&:before { .icon {
content: ' ';
display: block; display: block;
position: absolute; position: absolute;
width: 25px; width: 25px;
...@@ -127,13 +191,6 @@ ...@@ -127,13 +191,6 @@
} }
} }
} }
.netdisk-mkdir {
position: absolute;
right: 0;
top: 0;
}
} }
// for save // for save
......
...@@ -1749,6 +1749,12 @@ body { ...@@ -1749,6 +1749,12 @@ body {
bottom: 0; bottom: 0;
left: 40px; 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 { #main-menu .main-menu-level1 > .fui-tabs-panel-wrap > .fui-panel > .fui-panel-content {
position: absolute; position: absolute;
...@@ -1839,6 +1845,46 @@ body { ...@@ -1839,6 +1845,46 @@ body {
margin: 0; margin: 0;
padding-left: 38px; 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 { .new-file-template-select {
margin: 0; margin: 0;
padding: 0; padding: 0;
...@@ -2319,14 +2365,106 @@ body { ...@@ -2319,14 +2365,106 @@ body {
font-size: 12px; font-size: 12px;
color: #999; 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; padding-bottom: 10px;
height: 30px; height: 30px;
border-bottom: 1px solid #eee; 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; font-size: 18px;
} }
.netdisk-finder-container .netdisk-nav span, .netdisk-finder .head .nav span,
.netdisk-finder-container .netdisk-nav a { .netdisk-finder .head .nav a {
display: inline-block; display: inline-block;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
...@@ -2335,7 +2473,7 @@ body { ...@@ -2335,7 +2473,7 @@ body {
cursor: default; cursor: default;
vertical-align: middle; vertical-align: middle;
} }
.netdisk-finder-container .netdisk-nav span.my-document { .netdisk-finder .head .nav span.my-document {
width: 25px; width: 25px;
height: 25px; height: 25px;
padding: 0; padding: 0;
...@@ -2344,7 +2482,7 @@ body { ...@@ -2344,7 +2482,7 @@ body {
top: -2px; top: -2px;
background: url(../images/icons.png) 0 -470px; 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%; border-radius: 100%;
width: 23px; width: 23px;
height: 23px; height: 23px;
...@@ -2355,7 +2493,7 @@ body { ...@@ -2355,7 +2493,7 @@ body {
top: -1px; top: -1px;
background: url(../images/icons.png) -2px -396px no-repeat; background: url(../images/icons.png) -2px -396px no-repeat;
} }
.netdisk-finder-container .netdisk-nav span.spliter { .netdisk-finder .head .nav span.spliter {
content: ' '; content: ' ';
display: block; display: block;
width: 0; width: 0;
...@@ -2370,54 +2508,63 @@ body { ...@@ -2370,54 +2508,63 @@ body {
display: inline-block; display: inline-block;
margin-left: 4px; 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; background-color: #f4f5f7;
} }
.netdisk-finder-container .netdisk-nav a:active { .netdisk-finder .head .nav a:active {
background-color: #d7dae1; background-color: #d7dae1;
} }
.netdisk-finder-container .netdisk-file-list { .netdisk-finder .file-list {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
position: absolute;
top: 40px;
right: 0;
bottom: 0;
left: 0;
overflow: auto; overflow: auto;
} }
.netdisk-finder-container .netdisk-file-list .empty { .netdisk-finder .file-list .empty {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
color: #ccc; color: #ccc;
} }
.netdisk-finder-container .netdisk-file-list .netdisk-file-list-item { .netdisk-finder .file-list .file-list-item {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
padding: 10px 20px 10px 40px; padding: 10px 20px 10px 40px;
cursor: default; 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 { .netdisk-finder .file-list .file-list-item:hover {
background-color: #f4f5f7; /* 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; 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; background-color: #717b94;
color: white; color: white;
} }
.netdisk-finder-container .netdisk-file-list .netdisk-file-list-item.selected.file:before { .netdisk-finder .file-list .file-list-item.selected.dir .icon {
background-position: 0 -545px; background: #717b94 url(../images/icons.png) 0 -1085px;
} }
.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; position: relative;
} }
.netdisk-finder-container .netdisk-file-list .netdisk-file-list-item.file:before { .netdisk-finder .file-list .file-list-item.file .icon {
content: ' ';
display: block; display: block;
position: absolute; position: absolute;
width: 25px; width: 25px;
...@@ -2426,11 +2573,10 @@ body { ...@@ -2426,11 +2573,10 @@ body {
top: 7px; top: 7px;
background: url(../images/icons.png) 0 -445px no-repeat; 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; position: relative;
} }
.netdisk-finder-container .netdisk-file-list .netdisk-file-list-item.dir:before { .netdisk-finder .file-list .file-list-item.dir .icon {
content: ' ';
display: block; display: block;
position: absolute; position: absolute;
width: 25px; width: 25px;
...@@ -2439,7 +2585,7 @@ body { ...@@ -2439,7 +2585,7 @@ body {
top: 7px; top: 7px;
background: url(../images/icons.png) 0 -420px no-repeat; 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: ' '; content: ' ';
display: block; display: block;
width: 0; width: 0;
...@@ -2456,16 +2602,11 @@ body { ...@@ -2456,16 +2602,11 @@ body {
top: 20px; top: 20px;
margin-top: -4px; 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; margin: 0;
outline: none; outline: none;
width: 61.80%; width: 61.80%;
} }
.netdisk-finder-container .netdisk-mkdir {
position: absolute;
right: 0;
top: 0;
}
.netdisk-save-panel .netdisk-file-list { .netdisk-save-panel .netdisk-file-list {
bottom: 50px; bottom: 50px;
} }
......
This diff is collapsed.
<?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="&#x56FE;&#x5C42;_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="&#x56FE;&#x5C42;_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="&#x56FE;&#x5C42;_2_x5F_&#x590D;&#x5236;">
</g>
<g id="&#x56FE;&#x5C42;_1_x5F_&#x590D;&#x5236;">
<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="&#x56FE;&#x5C42;_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>
This diff is collapsed.
ui/theme/default/images/icons.png

19.9 KB | W: | H:

ui/theme/default/images/icons.png

20.3 KB | W: | H:

ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment