From b3b0e1da1ac1b17f3b5e0f6173c92d0eaafffb1b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 2 Oct 2013 13:53:17 +0000 Subject: [PATCH] refactor(key) Tab: add " " --- lib/client/key.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/client/key.js b/lib/client/key.js index 85ac4ff7..2924e958 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -52,7 +52,6 @@ var CloudCmd, Util, DOM; lTabPanel = { left : 0, right : 0 - }; this.isBind = function() {return Binded;}; @@ -80,18 +79,20 @@ var CloudCmd, Util, DOM; switch (lKeyCode) { case Key.TAB: /* changing parent panel of curent-file */ - var lPanel = DOM.getPanel(), - lId = lPanel.id; + var lFirstFileOnList, + lPanel = DOM.getPanel(), + lId = lPanel.id; - lTabPanel[lId] = lCurrent; + lTabPanel[lId] = lCurrent; - lPanel = DOM.getPanel({active:false}); - lId = lPanel.id; + lPanel = DOM.getPanel({active:false}); + lId = lPanel.id; - if (lTabPanel[lId]) - DOM.setCurrentFile(lTabPanel[lId]); - else{ - var lFirstFileOnList = DOM.getByTag('li', lPanel)[2]; + lCurrent = lTabPanel[lId]; + if (lCurrent) + DOM.setCurrentFile(lCurrent); + else { + lFirstFileOnList = DOM.getByTag('li', lPanel)[2]; DOM.setCurrentFile(lFirstFileOnList); }