mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
added getPanel function, left is not the only panel, thet could be using for text editing
This commit is contained in:
parent
920b9c9ac8
commit
288eb205d4
1 changed files with 23 additions and 14 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue