Merge pull request #7593 from minrk/edit-cm-size

fix CodeMirror div measurement on edit page
pull/37/head
Matthias Bussonnier 11 years ago
commit 361b6286d2

@ -79,16 +79,11 @@ require([
// Make sure the codemirror editor is sized appropriatley.
var _handle_resize = function() {
var header = $('#header');
var backdrop = $("#texteditor-backdrop");
// The header doesn't have a margin or padding above it. Calculate
// the lower margin&padding by subtracting the innerHeight from the
// outerHeight.
var header_margin_bottom = header.outerHeight(true) - header.innerHeight();
// When scaling CodeMirror, subtract the header lower margin from the
// height twice. Once for top padding and once for bottom padding.
$('div.CodeMirror').height(window.innerHeight - header.height() - 2*header_margin_bottom);
// account for padding on the backdrop wrapper
var padding = backdrop.outerHeight(true) - backdrop.height();
$('div.CodeMirror').height($("#site").height() - padding);
};
$(window).resize(_handle_resize);

@ -10,7 +10,6 @@
padding-bottom: @page-header-padding;
@media not print{
min-height: @page-backdrop-height;
background-color: @page-backdrop-color;
}
@ -27,7 +26,6 @@
@media not print{
padding: 0px;
background-color : @page-color;
min-height: @page-min-height;
.box-shadow(@global-shadow);
}
}

@ -8878,7 +8878,6 @@ ul#new-menu {
}
@media not print {
#texteditor-backdrop {
min-height: 100vh;
background-color: #eeeeee;
}
}
@ -8898,7 +8897,6 @@ ul#new-menu {
#texteditor-backdrop #texteditor-container {
padding: 0px;
background-color: #ffffff;
min-height: 0;
-webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}

Loading…
Cancel
Save