refactor(dom) processFiles

This commit is contained in:
coderaiser 2015-04-24 08:10:56 -04:00
parent e36df63a0b
commit 29c63f1f2b

View file

@ -1623,7 +1623,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
ok = from !== to && to;
if (ok && (shouldAsk && sameName))
if (ok && shouldAsk && sameName)
ok = Dialog.confirm(Util.render('"{{ name }}" already exist. Overwrite?', {
name: name
}));
@ -1641,8 +1641,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
var path = CloudFunc.rmLastSlash(from);
DOM.Storage.remove(path, function() {
var panel = DOM.getPanel(),
panelPassive = DOM.getPanel({active: false}),
var panel = CurrentInfo.panel,
panelPassive = CurrentInfo.panelPassive,
setCurrent = function() {
var current;
@ -1653,9 +1653,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
DOM.setCurrentFile(current);
};
CloudCmd.refresh(panelPassive, {noCurrent: true}, function() {
});
CloudCmd.refresh(panelPassive, {noCurrent: true});
CloudCmd.refresh(panel, setCurrent);
});