fix(client) loadDir: changePanel even when noCurrent is true

This commit is contained in:
coderaiser 2015-03-27 11:16:57 -04:00
parent 897f0099b2
commit 15b2a62217
2 changed files with 12 additions and 5 deletions

View file

@ -64,10 +64,11 @@ var Util, DOM, CloudFunc, join;
if (pathParams)
link = pathParams;
if (panel && panel !== Info.panel) {
DOM.changePanel();
panelChanged = true;
}
if (!params.noCurrent)
if (panel && panel !== Info.panel) {
DOM.changePanel();
panelChanged = true;
}
if (panelChanged || isRefresh)
imgPosition = 'top';
@ -325,6 +326,9 @@ var Util, DOM, CloudFunc, join;
options = {};
}
if (typeof callback !== 'function')
throw(Error('callback should be function!'));
CloudCmd.loadDir({
path : notSlashlLink,
isRefresh : NEEDREFRESH,

View file

@ -1636,7 +1636,10 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
DOM.setCurrentFile(current);
};
CloudCmd.refresh(panelPassive, {noCurrent: true});
CloudCmd.refresh(panelPassive, {noCurrent: true}, function() {
});
CloudCmd.refresh(panel, setCurrent);
});
});