From 7882e6f4cf9ccf85bc9cff41a8a247c5eb169302 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Feb 2014 11:12:54 -0500 Subject: [PATCH] refactor(listeners) changeLinks: add isDir --- lib/client/listeners.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client/listeners.js b/lib/client/listeners.js index c50cf1d7..2921ff94 100644 --- a/lib/client/listeners.js +++ b/lib/client/listeners.js @@ -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 };