mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(listeners) unSetOnPanel
This commit is contained in:
parent
1b943cff28
commit
9bcfdf1e95
1 changed files with 5 additions and 12 deletions
|
|
@ -112,28 +112,21 @@ var Util, DOM, CloudCmd;
|
|||
};
|
||||
|
||||
this.unSetOnPanel = function(panelId) {
|
||||
var i, n, ai, link, loadDir,
|
||||
url = CloudCmd.HOST,
|
||||
panel = DOM.getById(panelId),
|
||||
var panel = DOM.getById(panelId),
|
||||
filesElement = DOM.getByDataName('js-files', panel),
|
||||
pathElement = DOM.getByDataName('js-path', panel),
|
||||
pathLinks = DOM.getByDataName('js-links', pathElement).children,
|
||||
pathLinks = DOM.getByDataName('js-links', pathElement),
|
||||
clearStorage = DOM.getByDataName('js-clear-storage', pathElement),
|
||||
refresh = DOM.getByDataName('js-refresh', pathElement);
|
||||
|
||||
/* ставим загрузку гифа на клик*/
|
||||
Events.rmClick(onRefreshClick, refresh);
|
||||
|
||||
Events.rmClick(Storage.clear, clearStorage);
|
||||
|
||||
n = pathLinks.length;
|
||||
for (i = 0; i < n; i++) {
|
||||
ai = pathLinks[i];
|
||||
link = Util.rmStr(ai.href, url),
|
||||
loadDir = OnPathLinks.shift();
|
||||
|
||||
Util.forEach(pathLinks.children, function(ai) {
|
||||
var loadDir = OnPathLinks.shift();
|
||||
Events.rmClick(loadDir, ai);
|
||||
}
|
||||
});
|
||||
|
||||
Events.remove(EventsFiles, filesElement);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue