refactor(client) loadDir: rm getCurrentLink

This commit is contained in:
coderaiser 2014-07-10 02:53:15 -04:00
parent 26a9d74c7a
commit 8a4787c875

View file

@ -34,9 +34,7 @@ var Util, DOM, CloudFunc;
this.loadDir = function(params) {
var link, imgPosition, panelChanged, pathParams,
isRefresh, panel, history,
p = params,
currentLink = DOM.getCurrentLink(),
href = currentLink.href;
p = params;
if (params) {
pathParams = p.path;
@ -47,28 +45,24 @@ var Util, DOM, CloudFunc;
if (pathParams)
link = pathParams;
else
link = Util.rmStr(href, CloudCmd.HOST);
if (link || currentLink.target !== '_blank') {
if (panel && panel !== Info.panel) {
DOM.changePanel();
panelChanged = true;
}
if (panelChanged || isRefresh)
imgPosition = {
top: true
};
Images.showLoad(imgPosition);
/* загружаем содержимое каталога */
ajaxLoad(link, {
refresh : isRefresh,
history : history
}, panel);
if (panel && panel !== Info.panel) {
DOM.changePanel();
panelChanged = true;
}
if (panelChanged || isRefresh)
imgPosition = {
top: true
};
Images.showLoad(imgPosition);
/* загружаем содержимое каталога */
ajaxLoad(link, {
refresh : isRefresh,
history : history
}, panel);
};
/**