mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(client) goToParentDir: set current dir
This commit is contained in:
parent
7f212b116b
commit
e1683f6743
1 changed files with 14 additions and 1 deletions
|
|
@ -513,13 +513,26 @@ var Util, DOM, CloudFunc, join;
|
|||
|
||||
this.goToParentDir = function() {
|
||||
var path = Info.dirPath,
|
||||
dir = Info.dir,
|
||||
parentPath = Info.parentDirPath;
|
||||
|
||||
if (path !== parentPath) {
|
||||
path = parentPath;
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path: path
|
||||
path: path,
|
||||
}, function() {
|
||||
var current,
|
||||
panel = Info.panel;
|
||||
|
||||
current = DOM.getCurrentByName(dir);
|
||||
|
||||
if (!current)
|
||||
current = DOM.getFiles(panel)[0];
|
||||
|
||||
DOM.setCurrentFile(current, {
|
||||
history: history
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue