fix(dom) set current file after copy/move

This commit is contained in:
coderaiser 2014-10-17 04:00:34 -04:00
parent 6e9e07cd2e
commit f2b7864464
2 changed files with 7 additions and 12 deletions

View file

@ -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,

View file

@ -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);
}
});
});