diff --git a/ChangeLog b/ChangeLog index cd638b6c..2efb3fb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -101,6 +101,9 @@ clicked on menu item. * Moved jsons to json folder. +* Fixed bug with working links in path panel and +with clicks on files. + 2012.12.12, Version 0.1.8 diff --git a/json/config.json b/json/config.json index 6e9dd506..2daffa62 100644 --- a/json/config.json +++ b/json/config.json @@ -3,7 +3,7 @@ "appcache" : false, "cache" : {"allowed" : false}, "minification" : { - "js" : true, + "js" : false, "css" : true, "html" : true, "img" : true diff --git a/lib/client.js b/lib/client.js index c8d94990..c0ada80e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -79,11 +79,9 @@ CloudCmd.GoogleAnalytics = function(){ * @param pNeedRefresh - необходимость обязательной загрузки данных с сервера */ CloudCmd._loadDir = function(pLink, pNeedRefresh){ - return function(){ - /* - * показываем гиф загрузки возле пути папки сверху - * ctrl+r нажата? - */ + return function(pEvent){ + /* показываем гиф загрузки возле пути папки сверху + * ctrl+r нажата? */ DOM.Images.showLoad(pNeedRefresh ? {top:true} : null); @@ -96,6 +94,8 @@ CloudCmd._loadDir = function(pLink, pNeedRefresh){ /* если нажали на ссылку на верхний каталог*/ if(lParent === '..' && lDir !== '/') CloudCmd._currentToParent(lDir); + + pEvent.preventDefault(); }; }; @@ -511,7 +511,9 @@ CloudCmd._changeLinks = function(pPanelID){ if (lLi.className === 'path') DOM.addClickListener( lLoadDir, ai ); else { - DOM.addClickListener( Util.retFalse, lLi); + DOM.addClickListener( function(pEvent){ + pEvent.preventDefault(); + }, ai); DOM.addListener('mousedown', lSetCurrentFile_f, lLi); DOM.addListener('ondragstart', lOnDragStart_f, ai); /* if right button clicked menu will diff --git a/lib/client/dom.js b/lib/client/dom.js index d445a96c..e4be7f9c 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1064,6 +1064,15 @@ var CloudCommander, Util, return lPanel; }; + /** prevent default event */ + DOM.preventDefault = function(pEvent){ + var lRet; + + lRet = Util.exec(pEvent.preventDefault); + + return lRet; + }; + DOM.show = function(pElement){ DOM.removeClass(pElement, 'hidden'); };