added getPanel function, left is not the only panel, thet could be using for text editing

This commit is contained in:
coderaiser 2012-07-17 15:02:35 -04:00
parent 920b9c9ac8
commit 288eb205d4

View file

@ -77,20 +77,29 @@ CloudCommander.Editor.CloudMirror = {
lCloudEditor &&
(lCloudEditor.className = '');
}),
hide :(function(pParent) {
return function(){
CloudCommander.keyBinded = true;
var lLeft = pParent.getById('left');
var lCloudEditor = pParent.getById('CloudEditor');
lCloudEditor &&
(lCloudEditor.className = 'hidden');
lLeft &&
(lLeft.className = 'panel');
}}),
getById: function(pId){return document.getElementById(pId);}
hide : (function(pParent) {
return function(){
CloudCommander.keyBinded = true;
var lLeft = pParent.getById('left');
var lCloudEditor = pParent.getById('CloudEditor');
lCloudEditor &&
(lCloudEditor.className = 'hidden');
lLeft &&
(lLeft.className = 'panel');
};
}),
getById: function(pId){return document.getElementById(pId);},
getPanel: function(){
var lCurrent = document.getElementsByClassName('current-file');
lCurrent.length &&
(lCurrent = lCurrent[0].parentElement);
return lCurrent && lCurrent.id;
}
};
CloudCommander.Editor.Keys = (function(){
"use strict";