diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 0e25dd0d..1ff103b1 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -24,9 +24,22 @@ CloudCommander.keyBinding=(function(){ */ if(event.keyCode===9){ console.log('Tab pressed'); + + var lCURRENT_FILE = CloudCommander.CURRENT_FILE; try{ - lCurrentFile=getByClass(CloudCommander.CURRENT_FILE)[0]; - }catch(error){console.log(error);} + lCurrentFile = getByClass(lCURRENT_FILE)[0]; + + /* changing parent panel of curent-file */ + var lId = lCurrentFile.parentElement.id; + if(lId === 'right')lId = 'left'; + else lId = 'right'; + + lCurrentFile.className = ''; + + getById(lId).getByTagName('li')[2] + .className = lCURRENT_FILE; + + }catch(error){console.log(error);} } /* if f3 pressed */ else if(event.keyCode===114){