mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
minor changes
This commit is contained in:
parent
3769ebb712
commit
ad820abe41
4 changed files with 86 additions and 78 deletions
|
|
@ -4,22 +4,22 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
*/
|
||||
(function(){
|
||||
"use strict";
|
||||
var cloudcmd = CloudCommander;
|
||||
var Util = CloudCommander.Util;
|
||||
var KeyBinding = CloudCommander.KeyBinding;
|
||||
var cloudcmd = CloudCommander;
|
||||
var Util = CloudCommander.Util;
|
||||
var KeyBinding = CloudCommander.KeyBinding;
|
||||
|
||||
CloudCommander.Editor = {
|
||||
CloudCommander.Editor = {
|
||||
get : (function(){
|
||||
return this.CodeMirror;
|
||||
})
|
||||
};
|
||||
var Cloud_CodeMirror = {};
|
||||
var CloudMirror = {};
|
||||
|
||||
/* indicator says CodeMirror still loads */
|
||||
Cloud_CodeMirror.loading = false;
|
||||
CloudMirror.loading = false;
|
||||
|
||||
/* function loads CodeMirror js and css files */
|
||||
Cloud_CodeMirror.load = (function(pCurrentFile, pIsReadOnly){
|
||||
CloudMirror.load = (function(pCurrentFile, pIsReadOnly){
|
||||
/* function shows editor */
|
||||
var lThis = this;
|
||||
var createEditorDiv = function(){
|
||||
|
|
@ -69,7 +69,7 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
});
|
||||
|
||||
/* function shows CodeMirror editor */
|
||||
Cloud_CodeMirror.show = (function(pCurrentFile, pIsReadOnly){
|
||||
CloudMirror.show = (function(pCurrentFile, pIsReadOnly){
|
||||
/* if CloudEditor is not loaded - loading him */
|
||||
var lCloudEditor = Util.getById('CloudEditor');
|
||||
if(!lCloudEditor)
|
||||
|
|
@ -168,7 +168,7 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
});
|
||||
|
||||
/* function hides CodeMirror editor */
|
||||
Cloud_CodeMirror.hide = (function() {
|
||||
CloudMirror.hide = (function() {
|
||||
return function(){
|
||||
KeyBinding.set();
|
||||
Util.showPanel();
|
||||
|
|
@ -185,7 +185,7 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
};
|
||||
});
|
||||
|
||||
CloudCommander.Editor.Keys = (function(pCurrentFile, pIsReadOnly){
|
||||
cloudcmd.Editor.Keys = (function(pCurrentFile, pIsReadOnly){
|
||||
"use strict";
|
||||
|
||||
var lThis = this.CodeMirror;
|
||||
|
|
@ -197,8 +197,8 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
/* если клавиши можно обрабатывать */
|
||||
if( KeyBinding.get() ){
|
||||
/* if f4 or f3 pressed */
|
||||
var lF3 = CloudCommander.KEY.F3;
|
||||
var lF4 = CloudCommander.KEY.F4;
|
||||
var lF3 = cloudcmd.KEY.F3;
|
||||
var lF4 = cloudcmd.KEY.F4;
|
||||
var lShow = lThis.show.bind(lThis);
|
||||
|
||||
var lCurrentFile = Util.getCurrentFile();
|
||||
|
|
@ -231,5 +231,5 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
}
|
||||
});
|
||||
|
||||
CloudCommander.Editor.CodeMirror = Cloud_CodeMirror;
|
||||
cloudcmd.Editor.CodeMirror = CloudMirror;
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue