refactor(listeners) changeLinks: file -> current

This commit is contained in:
coderaiser 2013-12-27 12:56:42 +00:00
parent 3609c030c6
commit 5d44fbf9c0

View file

@ -171,7 +171,7 @@ var Util, DOM, CloudCmd;
DOM.setCurrentFile(pElement);
},
i, n, a, ai, file, link, loadDir,
i, n, a, ai, current, link, loadDir,
filesElement = DOM.getByClass('files', lPanel)[0],
files = filesElement.children,
lUrl = CloudCmd.HOST,
@ -194,14 +194,14 @@ var Util, DOM, CloudCmd;
n = a.length;
for (i = 0; i < n ; i++) {
file = files[i];
ai = a[i],
current = files[i];
ai = a[i],
Events.add({
'mousedown' : lSetCurrentFile_f,
'contextmenu' : lOnContextMenu_f,
'dragstart' : lOnDragStart_f
}, file);
}, current);
/* если на файл, а не на папку */
if (ai.target === '_blank')
@ -213,9 +213,9 @@ var Util, DOM, CloudCmd;
'dblclick' : lLoadDirOnce,
'touchend' : lLoadDirOnce,
'click' : DOM.preventDefault,
}, file);
}, current);
file.id = (ai.title ? ai.title : ai.textContent) +
current.id = (ai.title ? ai.title : ai.textContent) +
'(' + pPanelID + ')';
}
};