mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
improved borders over CodeMirror and panels
This commit is contained in:
parent
5367452a8f
commit
1bffa3033e
4 changed files with 26 additions and 18 deletions
|
|
@ -31,6 +31,9 @@ Function scrollIntoViewIfNeeded was polyfilled.
|
|||
|
||||
* Fixed bug with setting current file when mouse down.
|
||||
|
||||
* Improved borders over CodeMirror and panels thrue css.
|
||||
|
||||
|
||||
2012.08.24, Version 0.1.6
|
||||
|
||||
* From now jsload, cssload and anyload suport arrays.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cache" : {"allowed" : false},
|
||||
"minification" : {
|
||||
"js" : false,
|
||||
"css" : true,
|
||||
"css" : false,
|
||||
"html" : true,
|
||||
"img" : true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ background:url(/img/panel_refresh.png) 0 -15px no-repeat;
|
|||
}
|
||||
#fm{
|
||||
height: 90%;
|
||||
margin: 10px;
|
||||
margin: 26px;
|
||||
}
|
||||
.fm_header{
|
||||
font-weight: bold;
|
||||
|
|
@ -177,6 +177,8 @@ background:url(/img/panel_refresh.png) 0 -15px no-repeat;
|
|||
}
|
||||
.panel{
|
||||
border: 1.5px solid rgba(49, 123, 249, .40);
|
||||
/* remove default margins */
|
||||
margin: 0 0 0 0;
|
||||
overflow-y: auto;
|
||||
width:46%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,24 +48,23 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
|
||||
|
||||
Util.cssSet({id:'editor',
|
||||
inner : '.CodeMirror{' +
|
||||
'font-family :\'Droid Sans Mono\';' +
|
||||
'font-size :15px;' +
|
||||
'padding :20px;' +
|
||||
'border: 1.5px solid rgba(49, 123, 249, .40)'+
|
||||
'}' +
|
||||
'.CodeMirror-scroll{' +
|
||||
'height : ' + cloudcmd.HEIGHT + 'px' +
|
||||
inner : '.CodeMirror{' +
|
||||
'font-family :\'Droid Sans Mono\';' +
|
||||
'font-size :15px;' +
|
||||
'padding :20px 0 0 0;' +
|
||||
'}' +
|
||||
'.CodeMirror-scroll{' +
|
||||
'height : ' + (cloudcmd.HEIGHT-40) + '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);
|
||||
});
|
||||
|
||||
|
|
@ -92,6 +91,7 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
var lThis = this;
|
||||
|
||||
var initCodeMirror_f = function(pValue){
|
||||
lCloudEditor.className = 'panel';
|
||||
new CodeMirror(lCloudEditor,{
|
||||
mode : 'javascript',
|
||||
value : pValue,
|
||||
|
|
@ -173,12 +173,15 @@ var CloudCommander, CloudFunc, CodeMirror;
|
|||
KeyBinding.set();
|
||||
Util.showPanel();
|
||||
|
||||
var lCloudEditor = Util.getById('CloudEditor');
|
||||
var lCodeMirror = Util.getByClass('CodeMirror');
|
||||
|
||||
if(lCodeMirror.length)
|
||||
lCloudEditor
|
||||
.removeChild(lCodeMirror[0]);
|
||||
var lCloudEditor = Util.getById('CloudEditor');
|
||||
if(lCloudEditor){
|
||||
lCloudEditor.className = 'hidden';
|
||||
var lCodeMirror = Util.getByClass('CodeMirror', lCloudEditor);
|
||||
|
||||
if(lCodeMirror.length)
|
||||
lCloudEditor
|
||||
.removeChild(lCodeMirror[0]);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue