Commit 35482c03 authored by techird's avatar techird

添加文件移动功能

parent 327f7577
......@@ -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'
}
}
......
......@@ -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' },
......
......@@ -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': '加粗',
......
Subproject commit af5b1072aa358004f8eed3fc426bdc61627634d5
Subproject commit 8a1fe1e02a0ae7b3440a80182b899fc8bcd71c23
......@@ -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() {
// 主菜单默认选中「打开」
......
......@@ -72,14 +72,12 @@ KityMinder.registerUI('menu/open/local', function(minder) {
}, false);
cwrapper.addEventListener('drop', function(e) {
e.preventDefault();
if (!$doc.checkSaved()) return;
if (e.dataTransfer.files.length) {
e.preventDefault();
if (!$doc.checkSaved()) return;
read(e.dataTransfer.files[0]);
$menu.hide();
}
$menu.hide();
}, false);
function read(domfile) {
......
......@@ -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 {
.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;
font-size: 18px;
.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;
span, a {
display: inline-block;
height: 20px;
line-height: 20px;
padding: 5px 10px;
margin: 0 3px 0 0;
cursor: default;
vertical-align: middle;
}
&.recycle {
background-position: -30px 0;
&.drag-enter {
background-position: -60px 0 !important;
}
}
span.my-document {
width: 25px;
height: 25px;
padding: 0;
text-indent: -1000px;
position: relative;
top: -2px;
background: url(../images/icons.png) 0 -470px;
&:hover {
border: 1px solid lighten(#717B94, 30%);
}
&:active {
box-shadow: inset 0 1px 3px fadeOut(#717B94, 80%);
}
}
}
.nav {
font-size: 18px;
a.dir-back {
border-radius: 100%;
width: 23px;
height: 23px;
padding: 0;
border: 1px solid @ui-color;
text-indent: -1000px;
position: relative;
top: -1px;
background: url(../images/icons.png) -2px -396px no-repeat;
span, a {
display: inline-block;
height: 20px;
line-height: 20px;
padding: 5px 10px;
margin: 0 3px 0 0;
cursor: default;
vertical-align: middle;
}
span.my-document {
width: 25px;
height: 25px;
padding: 0;
text-indent: -1000px;
position: relative;
top: -2px;
background: url(../images/icons.png) 0 -470px;
}
a.dir-back {
border-radius: 100%;
width: 23px;
height: 23px;
padding: 0;
border: 1px solid @ui-color;
text-indent: -1000px;
position: relative;
top: -1px;
background: url(../images/icons.png) -2px -396px no-repeat;
}
}
span.spliter {
.triangle-left(black,4px,8px);
display: inline-block;
margin-left: 4px;
}
a {
&:hover {
background-color: lighten(@tab-hover, 55%);
span.spliter {
.triangle-left(black,4px,8px);
display: inline-block;
margin-left: 4px;
}
&:active {
background-color: lighten(@tab-active, 55%)
a {
border: 1px solid transparent;
&:hover {
background-color: lighten(@tab-hover, 55%);
}
&:active {
background-color: lighten(@tab-active, 55%)
}
}
}
}
.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
......
......@@ -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 -545px;
.netdisk-finder .file-list .file-list-item.selected.dir .icon {
background: #717b94 url(../images/icons.png) 0 -1085px;
}
.netdisk-finder .file-list .file-list-item.selected.dir:after {
border-left-color: white;
}
.netdisk-finder-container .netdisk-file-list .netdisk-file-list-item.file {
.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;
}
......
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