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