From 8d60348975751df7f0fa694db5150153f8bd2a9b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 30 Jul 2012 10:42:01 +0300 Subject: [PATCH] Update lib/client/keyBinding.js --- lib/client/keyBinding.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 6d1b5b83..edfd0e7d 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -38,16 +38,17 @@ CloudCommander.keyBinding=(function(){ var lId = lCurrentFile.parentElement.id; lTabPanel[lId] = lCurrentFile; - if (lTabPanel[lId]) - lTabPanel[lId].className = lCurrentFile; - else - getById(lId).getElementsByTagName('li')[2] - .className = lCURRENT_FILE; - + lId === 'right' && (lId = 'left') || (lId = 'right'); + + lTabPanel[lId] && + (lTabPanel[lId].className = lCurrentFile) || + (getById(lId).getElementsByTagName('li')[2] + .className = lCURRENT_FILE); + lCurrentFile.className = ''; }catch(error){console.log(error);}