From a5f2e11500f7c3f73d2cf7df8a80224f6a44b911 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 19 Feb 2013 09:22:50 -0500 Subject: [PATCH] fixed bug with pressing enter on file --- ChangeLog | 2 ++ lib/client.js | 2 +- lib/client/dom.js | 4 ++-- lib/client/keyBinding.js | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33597cb7..8fa38baa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -151,6 +151,8 @@ would not be supported anymore. * Added ability not to change url if we have no rights for reading. +* Fixed bug with pressing enter on file. + 2012.12.12, Version 0.1.8 diff --git a/lib/client.js b/lib/client.js index f2f748f2..afdbd97d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -449,7 +449,7 @@ CloudCmd._changeLinks = function(pPanelID){ lName = lElement.textContent; /* if it's directory - adding json extension */ - if( DOM.isCurrentDir() ){ + if( DOM.isCurrentIsDir() ){ lName += '.json'; lLink += '?json'; } diff --git a/lib/client/dom.js b/lib/client/dom.js index 03695be4..6c198f15 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -898,7 +898,7 @@ var CloudCommander, Util, lParams.error = lError; - if( DOM.isCurrentDir(lCurrentFile) ) + if( DOM.isCurrentIsDir(lCurrentFile) ) lPath += '?json'; if(!lParams.url) @@ -1055,7 +1055,7 @@ var CloudCommander, Util, * * @param pCurrentFile */ - DOM.isCurrentDir = function(pCurrentFile){ + DOM.isCurrentIsDir = function(pCurrentFile){ var lSize = DOM.getCurrentSize(pCurrentFile), lRet = lSize === ''; diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 651143ed..beb39b29 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -219,7 +219,8 @@ var CloudCommander, Util, DOM; /* если нажали Enter - открываем папку*/ else if(lKeyCode === KEY.ENTER) - Util.exec(CloudCmd._loadDir()); + if(DOM.isCurrentIsDir()) + Util.exec(CloudCmd._loadDir()); /* если нажали +r * обновляем страницу,