comments: fixed codemirror styling problems.
This commit is contained in:
parent
399ea1863d
commit
e198f35a29
2 changed files with 12 additions and 12 deletions
|
|
@ -298,8 +298,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
|||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
/* RhodeCode added !important, to fix diffs rule */
|
||||
-moz-box-sizing: content-box !important;
|
||||
box-sizing: content-box !important;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
|
|
|
|||
|
|
@ -269,14 +269,13 @@ var initMarkupCodeMirror = function(textAreadId, focus, options) {
|
|||
cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
|
||||
|
||||
// start listening on changes to make auto-expanded editor
|
||||
cm.on("change", function(instance, changeObj) {
|
||||
cm.on("change", function (instance, changeObj) {
|
||||
var height = initialHeight;
|
||||
var lines = instance.lineCount();
|
||||
if ( lines > 6 && lines < 20) {
|
||||
if (lines > 6 && lines < 20) {
|
||||
height = "auto";
|
||||
}
|
||||
else if (lines >= 20){
|
||||
zheight = 20*15;
|
||||
} else if (lines >= 20) {
|
||||
height = 20 * 15;
|
||||
}
|
||||
instance.setSize(null, height);
|
||||
|
||||
|
|
@ -501,15 +500,15 @@ var initCommentBoxCodeMirror = function(CommentForm, textAreaId, triggerActions)
|
|||
cm.setOption("mode", DEFAULT_RENDERER);
|
||||
CodeMirror.autoLoadMode(cm, DEFAULT_RENDERER); // load rst or markdown mode
|
||||
cmLog.debug('Loading codemirror mode', DEFAULT_RENDERER);
|
||||
|
||||
// start listening on changes to make auto-expanded editor
|
||||
cm.on("change", function(self) {
|
||||
cm.on("change", function (self) {
|
||||
var height = initialHeight;
|
||||
var lines = self.lineCount();
|
||||
if ( lines > 6 && lines < 20) {
|
||||
if (lines > 6 && lines < 20) {
|
||||
height = "auto";
|
||||
}
|
||||
else if (lines >= 20){
|
||||
zheight = 20*15;
|
||||
} else if (lines >= 20) {
|
||||
height = 20 * 15;
|
||||
}
|
||||
self.setSize(null, height);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue