feature(listeners) rm unSetOnPanel

This commit is contained in:
coderaiser 2014-05-23 11:03:03 -04:00
parent e3424896cb
commit 479eddaab6

View file

@ -10,7 +10,6 @@ var Util, DOM, CloudCmd;
Storage = DOM.Storage,
Events = DOM.Events,
getConfig = CloudCmd.getConfig,
OnPathLinks = [],
EventsFiles = {
'mousedown' : Util.exec.with(execIfNotUL, setCurrentFileByEvent),
'contextmenu' : onContextMenu,
@ -105,32 +104,11 @@ var Util, DOM, CloudCmd;
});
Events.addClick(load, ai);
OnPathLinks.push(load);
});
Events.add(EventsFiles, filesElement);
};
this.unSetOnPanel = function(panelId) {
var panel = DOM.getById(panelId),
filesElement = DOM.getByDataName('js-files', panel),
pathElement = DOM.getByDataName('js-path', panel),
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);
Util.forEach(pathLinks.children, function(ai) {
var loadDir = OnPathLinks.shift();
Events.rmClick(loadDir, ai);
});
Events.remove(EventsFiles, filesElement);
};
/**
* функция меняет ссыки на ajax-овые
* @param panelId