mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(client) loadDir: rm getCurrentLink
This commit is contained in:
parent
26a9d74c7a
commit
8a4787c875
1 changed files with 17 additions and 23 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue