feature(client) loadDir: image position on top, when no history

This commit is contained in:
coderaiser 2015-05-12 08:07:33 -04:00
parent f2f96e1015
commit 30cddd45f5

View file

@ -50,6 +50,7 @@ var Util, DOM, CloudFunc, join;
*/
this.loadDir = function(params, callback) {
var link, imgPosition, panelChanged, pathParams,
noCurrent,
isRefresh, panel, history,
p = params;
@ -58,18 +59,19 @@ var Util, DOM, CloudFunc, join;
isRefresh = p.isRefresh;
panel = p.panel;
history = p.history;
noCurrent = p.noCurrent;
}
if (pathParams)
link = pathParams;
if (!params.noCurrent)
if (!noCurrent)
if (panel && panel !== Info.panel) {
DOM.changePanel();
panelChanged = true;
}
if (panelChanged || isRefresh)
if (panelChanged || isRefresh || !history)
imgPosition = 'top';
Images.show.load(imgPosition);