fixed bug with height of CodeMirror

This commit is contained in:
coderaiser 2012-09-09 05:02:49 -04:00
parent 6a033c1c08
commit b329e1863b
2 changed files with 21 additions and 19 deletions

View file

@ -92,7 +92,7 @@ body{
color:rgba(222, 41, 41, 0.81);
}
.refresh-icon{
background:url(/img/panel_refresh.png) no-repeat;
background:url(/img/panel_refresh.png) no-repeat;
}
.refresh-icon:active{
/*background-position-y: -15px;*/
@ -338,4 +338,4 @@ a:focus { outline: thin dotted; }
#right{
display:none;
}
}
}

View file

@ -5,21 +5,21 @@ var CloudCommander, CloudFunc, CodeMirror;
(function(){
"use strict";
var cloudcmd = CloudCommander;
var Util = cloudcmd.Util;
var KeyBinding = cloudcmd.KeyBinding;
var Util = CloudCommander.Util;
var KeyBinding = CloudCommander.KeyBinding;
CloudCommander.Editor = {
get : (function(){
return this.CodeMirror;
})
};
CloudCommander.Editor.CodeMirror = {};
var Cloud_CodeMirror = {};
/* indicator says CodeMirror still loads */
CloudCommander.Editor.CodeMirror.loading = false;
Cloud_CodeMirror.loading = false;
/* function loads CodeMirror js and css files */
CloudCommander.Editor.CodeMirror.load = (function(pCurrentFile, pIsReadOnly){
Cloud_CodeMirror.load = (function(pCurrentFile, pIsReadOnly){
/* function shows editor */
var lThis = this;
var createEditorDiv = function(){
@ -48,28 +48,28 @@ var CloudCommander, CloudFunc, CodeMirror;
Util.cssSet({id:'editor',
inner : '.CodeMirror{' +
'font-family :\'Droid Sans Mono\';' +
'font-size :15px;' +
'padding :20px;' +
'}' +
'.CodeMirror-scroll{' +
'height : 660px;' +
inner : '.CodeMirror{' +
'font-family :\'Droid Sans Mono\';' +
'font-size :15px;' +
'padding :20px;' +
'}' +
'.CodeMirror-scroll{' +
'height : ' + cloudcmd.HEIGHT + 'px' +
'}'
});
Util.jsload('lib/client/editor/' +
Util.jsload('lib/client/editor/' +
'codemirror/mode/javascript.js',
createEditorDiv);
};
/* load CodeMirror main module */
Util.jsload('lib/client/editor/' +
Util.jsload('lib/client/editor/' +
'codemirror/codemirror.js', loadAll);
});
/* function shows CodeMirror editor */
CloudCommander.Editor.CodeMirror.show = (function(pCurrentFile, pIsReadOnly){
Cloud_CodeMirror.show = (function(pCurrentFile, pIsReadOnly){
/* if CloudEditor is not loaded - loading him */
var lCloudEditor = Util.getById('CloudEditor');
if(!lCloudEditor)
@ -167,7 +167,7 @@ var CloudCommander, CloudFunc, CodeMirror;
});
/* function hides CodeMirror editor */
CloudCommander.Editor.CodeMirror.hide = (function() {
Cloud_CodeMirror.hide = (function() {
return function(){
KeyBinding.set();
Util.showPanel();
@ -181,7 +181,7 @@ var CloudCommander, CloudFunc, CodeMirror;
};
});
CloudCommander.Editor.Keys = (function(pCurrentFile, pIsReadOnly){
CloudCommander.Editor.Keys = (function(pCurrentFile, pIsReadOnly){
"use strict";
var lThis = this.CodeMirror;
@ -226,4 +226,6 @@ var CloudCommander, CloudFunc, CodeMirror;
};
}
});
CloudCommander.Editor.CodeMirror = Cloud_CodeMirror;
})();