Show More
@@ -298,8 +298,9 b' div.CodeMirror span.CodeMirror-nonmatchi' | |||||
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 b' var initMarkupCodeMirror = function(text' | |||||
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 ( |
|
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 b' var initCommentBoxCodeMirror = function(' | |||||
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 ( |
|
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 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now