mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(dom) {copy, move}Current
This commit is contained in:
parent
fcd12db54e
commit
22960567fe
1 changed files with 10 additions and 2 deletions
|
|
@ -1608,6 +1608,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
*/
|
||||
this.renameCurrent = function(current) {
|
||||
var from, to, dirPath, cmp, files,
|
||||
path = CurrentInfo.dirPath,
|
||||
RESTful = DOM.RESTful;
|
||||
|
||||
if (!Cmd.isCurrentFile(current))
|
||||
|
|
@ -1642,8 +1643,11 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
*/
|
||||
this.moveCurrent = function(current) {
|
||||
var name, from, to, cmp, files,
|
||||
path = CurrentInfo.dirPath,
|
||||
RESTful = DOM.RESTful;
|
||||
|
||||
path = CloudFunc.rmLastSlash(path);
|
||||
|
||||
if (!Cmd.isCurrentFile(current))
|
||||
current = Cmd.getCurrentFile();
|
||||
|
||||
|
|
@ -1670,7 +1674,9 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
DOM.deleteCurrent(current);
|
||||
DOM.setCurrentFile(dotDot);
|
||||
CloudCmd.refresh();
|
||||
CloudCmd.refresh(dotDot, panel);
|
||||
|
||||
DOM.Storage.remove(path);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1682,6 +1688,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
*/
|
||||
this.copyCurrent = function(current) {
|
||||
var name, from, to, files, cmp,
|
||||
path = DOM.CurrentInfo.dirPath,
|
||||
RESTful = DOM.RESTful;
|
||||
|
||||
if (!Cmd.isCurrentFile(current))
|
||||
|
|
@ -1705,7 +1712,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
dotDot = DOM.getById( '..(' + id + ')');
|
||||
|
||||
DOM.setCurrentFile(dotDot);
|
||||
CloudCmd.refresh();
|
||||
CloudCmd.refresh(dotDot, panel);
|
||||
DOM.Storage.remove(path);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue