mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
fix(dom) set current file after copy/move
This commit is contained in:
parent
6e9e07cd2e
commit
f2b7864464
2 changed files with 7 additions and 12 deletions
|
|
@ -307,16 +307,11 @@ var Util, DOM, CloudFunc, join;
|
|||
};
|
||||
|
||||
this.refresh = function(panelParam, callback) {
|
||||
var panel,
|
||||
var panel = panelParam || Info.panel,
|
||||
NEEDREFRESH = true,
|
||||
path = DOM.getCurrentDirPath(panel),
|
||||
notSlashlLink = CloudFunc.rmLastSlash(path) || '/';
|
||||
|
||||
if (panel)
|
||||
panel = panelParam;
|
||||
else
|
||||
panel = Info.panel;
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path : notSlashlLink,
|
||||
isRefresh : NEEDREFRESH,
|
||||
|
|
|
|||
|
|
@ -1607,17 +1607,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
DOM.Storage.remove(path, function() {
|
||||
var panel = DOM.getPanel(),
|
||||
panelPassive = DOM.getPanel(true),
|
||||
id = panelPassive.id,
|
||||
dotDot = DOM.getById( '..(' + id + ')');
|
||||
setCurrent = function() {
|
||||
var current = DOM.getCurrentFileByName(name);
|
||||
DOM.setCurrentFile(current);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
DOM.setCurrentFile(dotDot);
|
||||
|
||||
CloudCmd.refresh(panel);
|
||||
CloudCmd.refresh(panelPassive);
|
||||
CloudCmd.refresh(panelPassive, setCurrent);
|
||||
} else {
|
||||
CloudCmd.refresh(panelPassive);
|
||||
CloudCmd.refresh(panel);
|
||||
CloudCmd.refresh(panel, setCurrent);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue