diff --git a/lib/client/dom.js b/lib/client/dom.js index fc887b25..92fe7211 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -7,11 +7,30 @@ var CloudCommander, $, Util, DOM, CloudFunc; /* PRIVATE */ - function getCurrentFile(){ return CloudCommander.CURRENT_FILE; } + /** + * private function thet unset currentfile + */ + function UnSetCurrentFile(pCurrentFile){ + if(!pCurrentFile) + DOM.addCloudStatus({ + code : -1, + msg : 'Error pCurrentFile in' + + 'unSetCurrentFile' + + 'could not be none' + }); + + var lRet_b = DOM.isCurrentFile(pCurrentFile); + + if(lRet_b) + DOM.removeClass(pCurrentFile, getCurrentFile()); + + return lRet_b; + } + /* private members */ var XMLHTTP, LoadingImage, @@ -612,8 +631,8 @@ var CloudCommander, $, Util, DOM, CloudFunc; pCurrentFile = pCurrentFile.nextSibling; if(lCurrentFileWas) - lUnSetCurrentFile(lCurrentFileWas); - + UnSetCurrentFile(lCurrentFileWas); + DOM.addClass(pCurrentFile, getCurrentFile()); /* scrolling to current file */ @@ -630,26 +649,6 @@ var CloudCommander, $, Util, DOM, CloudFunc; return CloudCommander.KeysPanel[pKey].onclick = pFunc; }; - /** - * private function thet unset currentfile - */ - var lUnSetCurrentFile = function(pCurrentFile){ - if(!pCurrentFile) - DOM.addCloudStatus({ - code : -1, - msg : 'Error pCurrentFile in' + - 'unSetCurrentFile' + - 'could not be none' - }); - - var lRet_b = DOM.isCurrentFile(pCurrentFile); - - if(lRet_b) - DOM.removeClass(pCurrentFile, getCurrentFile()); - - return lRet_b; - }; - /** * current file check *