comments: fixed codemirror styling problems.
marcink -
r4131:726badcf default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -298,8 +298,9
298 .CodeMirror-gutter,
298 .CodeMirror-gutter,
299 .CodeMirror-gutters,
299 .CodeMirror-gutters,
300 .CodeMirror-linenumber {
300 .CodeMirror-linenumber {
301 -moz-box-sizing: content-box;
301 /* RhodeCode added !important, to fix diffs rule */
302 box-sizing: content-box;
302 -moz-box-sizing: content-box !important;
303 box-sizing: content-box !important;
303 }
304 }
304
305
305 .CodeMirror-measure {
306 .CodeMirror-measure {
@@ -269,14 +269,13
269 cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
269 cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
270
270
271 // start listening on changes to make auto-expanded editor
271 // start listening on changes to make auto-expanded editor
272 cm.on("change", function(instance, changeObj) {
272 cm.on("change", function (instance, changeObj) {
273 var height = initialHeight;
273 var height = initialHeight;
274 var lines = instance.lineCount();
274 var lines = instance.lineCount();
275 if ( lines > 6 && lines < 20) {
275 if (lines > 6 && lines < 20) {
276 height = "auto";
276 height = "auto";
277 }
277 } else if (lines >= 20) {
278 else if (lines >= 20){
278 height = 20 * 15;
279 zheight = 20*15;
280 }
279 }
281 instance.setSize(null, height);
280 instance.setSize(null, height);
282
281
@@ -501,15 +500,15
501 cm.setOption("mode", DEFAULT_RENDERER);
500 cm.setOption("mode", DEFAULT_RENDERER);
502 CodeMirror.autoLoadMode(cm, DEFAULT_RENDERER); // load rst or markdown mode
501 CodeMirror.autoLoadMode(cm, DEFAULT_RENDERER); // load rst or markdown mode
503 cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
502 cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
503
504 // start listening on changes to make auto-expanded editor
504 // start listening on changes to make auto-expanded editor
505 cm.on("change", function(self) {
505 cm.on("change", function (self) {
506 var height = initialHeight;
506 var height = initialHeight;
507 var lines = self.lineCount();
507 var lines = self.lineCount();
508 if ( lines > 6 && lines < 20) {
508 if (lines > 6 && lines < 20) {
509 height = "auto";
509 height = "auto";
510 }
510 } else if (lines >= 20) {
511 else if (lines >= 20){
511 height = 20 * 15;
512 zheight = 20*15;
513 }
512 }
514 self.setSize(null, height);
513 self.setSize(null, height);
515 });
514 });
Comments 0
You need to be logged in to leave comments. Login now