mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(key) mv goToParentDir to client
This commit is contained in:
parent
65d3b61668
commit
f562657d58
2 changed files with 15 additions and 10 deletions
|
|
@ -494,5 +494,19 @@ var Util, DOM, CloudFunc;
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
this.goToParentDir = function() {
|
||||
var Info = DOM.CurrentInfo,
|
||||
path = Info.dirPath,
|
||||
parentPath = Info.parentDirPath;
|
||||
|
||||
if (path !== parentPath) {
|
||||
path = parentPath;
|
||||
path = CloudFunc.FS + CloudFunc.rmLastSlash(path);
|
||||
|
||||
Util.exec(CloudCmd.loadDir(path));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
})(this, Util, DOM, CloudFunc);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ var CloudCmd, Util, DOM;
|
|||
panel = Info.panel,
|
||||
path = Info.path,
|
||||
dirPath = Info.dirPath,
|
||||
parentDirPath = Info.parentDirPath,
|
||||
filesPassive = Info.filesPassive,
|
||||
prev = current.previousSibling,
|
||||
next = current.nextSibling,
|
||||
|
|
@ -389,15 +388,7 @@ var CloudCmd, Util, DOM;
|
|||
break;
|
||||
|
||||
case Key.BACKSPACE:
|
||||
path = Info.dirPath;
|
||||
|
||||
if (path !== parentDirPath) {
|
||||
path = parentDirPath;
|
||||
path = CloudFunc.FS + CloudFunc.rmLastSlash(path);
|
||||
|
||||
Util.exec(CloudCmd.loadDir(path));
|
||||
}
|
||||
|
||||
CloudCmd.goToParentDir();
|
||||
DOM.preventDefault(pEvent);
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue