refactor(listeners) setOnPanel

This commit is contained in:
coderaiser 2014-05-23 10:53:08 -04:00
parent 9bcfdf1e95
commit e8ba84e707

View file

@ -80,8 +80,7 @@ var Util, DOM, CloudCmd;
};
this.setOnPanel = function(panelId) {
var 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),
@ -96,8 +95,9 @@ var Util, DOM, CloudCmd;
Events.addClick(onRefreshClick, refresh);
Events.addClick(Storage.clear, clearStorage);
pathLinks.children.forEach(function(ai) {
var link = Util.rmStr(ai.href, url),
Util.forEach(pathLinks.children, function(ai) {
var url = CloudCmd.HOST,
link = Util.rmStr(ai.href, url),
load = Util.exec.with(loadDir, {
path : link,
isRefresh : false,