From e2522dbc210014e801c952f8492cf2b53ae09cff Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 14 Aug 2012 12:18:17 +0300 Subject: [PATCH] moved unSetCurrentfile to setCurrent file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All the time one of files must be current, so wen we setting up some file current, file that was previously current must be unset automatically.  --- client.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client.js b/client.js index dea9ddb0..1ceb941e 100644 --- a/client.js +++ b/client.js @@ -495,6 +495,8 @@ CloudClient.Util = (function(){ 'could not be none' }); + this.unSetCurrentFile(this.getCurrentFile()); + return pCurrentFile.className = CloudCommander.CURRENT_FILE; }; @@ -503,7 +505,7 @@ CloudClient.Util = (function(){ this.addCloudStatus({ code : -1, msg : 'Error pCurrentFile in' + - 'setCurrentFile' + + 'unSetCurrentFile' + 'could not be none' }); @@ -758,9 +760,7 @@ CloudClient._setCurrent=(function(){ CloudClient._editFileName(lParent); },400); } - else{ - Util.unSetCurrentFile(lCurrentFile); - + else{ /* устанавливаем курсор на файл, * на который нажали */ Util.setCurrentFile(this); @@ -810,7 +810,6 @@ CloudClient._currentToParent = (function(pDirName){ * set it to current file */ if(lRootDir){ - Util.unSetCurrentFile(lCurrentFile); Util.setCurrentFile(lRootDir); lRootDir.scrollIntoViewIfNeeded(); }