added tab positioning

This commit is contained in:
coderaiser 2012-07-30 10:38:28 +03:00
parent a9d5041756
commit 4d8348e663

View file

@ -11,6 +11,11 @@ CloudCommander.keyBinding=(function(){
return document.getElementById(pId);
};
var lTabPanel = {
left : {},
right : {}
};
var key_event=function(event){
var lCurrentFile;
var lName, lTop;
@ -31,14 +36,20 @@ CloudCommander.keyBinding=(function(){
/* changing parent panel of curent-file */
var lId = lCurrentFile.parentElement.id;
if(lId === 'right')lId = 'left';
else lId = 'right';
lCurrentFile.className = '';
lTabPanel[lId] = lCurrentFile;
if (lTabPanel[lId])
lTabPanel[lId].className = lCurrentFile;
else
getById(lId).getElementsByTagName('li')[2]
.className = lCURRENT_FILE;
getById(lId).getElementsByTagName('li')[2]
.className = lCURRENT_FILE;
lId === 'right' &&
(lId = 'left') ||
(lId = 'right');
lCurrentFile.className = '';
}catch(error){console.log(error);}
}
/* if f3 pressed */