mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(listeners) changeLinks: add isDir
This commit is contained in:
parent
29888f268a
commit
7882e6f4cf
1 changed files with 3 additions and 3 deletions
|
|
@ -75,7 +75,7 @@ var Util, DOM, CloudCmd;
|
|||
* @param panelId
|
||||
*/
|
||||
this.changeLinks = function(panelId) {
|
||||
var i, n, a, ai, current, link, loadDir, events, id,
|
||||
var i, n, a, ai, current, link, loadDir, events, id, isDir,
|
||||
|
||||
url = CloudCmd.HOST,
|
||||
loadDirOnce = CloudCmd.loadDir(),
|
||||
|
|
@ -176,6 +176,7 @@ var Util, DOM, CloudCmd;
|
|||
n = a.length;
|
||||
for (i = 0; i < n ; i++) {
|
||||
current = files[i];
|
||||
isDir = DOM.isCurrentIsDir(current);
|
||||
ai = a[i];
|
||||
|
||||
if (ai.title)
|
||||
|
|
@ -187,8 +188,7 @@ var Util, DOM, CloudCmd;
|
|||
|
||||
current.id = id;
|
||||
|
||||
/* если на файл, а не на папку */
|
||||
if (ai.target === '_blank')
|
||||
if (!isDir)
|
||||
events = {
|
||||
'click' : fileClick
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue