Commit 80d638da authored by jonnybradley's avatar jonnybradley

[FIX] codemirror: Patch up fullscreen mode with when using codemirror

parent 5379258a
......@@ -3,9 +3,8 @@
border: 1px solid gray;
cursor: text;
font: 1em Arial,Helvetica,sans-serif ! important;
font-size: 1em ! important;
clear: both;
height: auto !important;
height: auto;
}
/*from the codemirror website*/
......
......@@ -608,30 +608,30 @@ syntaxHighlighter = {
textarea.parent().toggleClass('CodeMirror-fullscreen');
$('body').toggleClass('noScroll');
$('.tabs,.rbox-title').toggle();
$('.tabs,.rbox-title, .modules').toggle();
var isFullscreen = ($('.CodeMirror-fullscreen').length ? true : false);
var win = $(window).data('cm-resize', true),
screen = $('.CodeMirror-fullscreen'),
editorObj = screen.find('.CodeMirror'),
toolbar = $('#editwiki_toolbar');
if (isFullscreen) {
var win = $(window)
.data('cm-resize', true),
screen = $('.CodeMirror-fullscreen'),
editorObj = screen.find('.CodeMirror'),
toolbar = $('#editwiki_toolbar');
editorObj.resizable( "disable" );
win.resize(function () {
if (win.data('cm-resize') && screen) {
screen.css('height', win.height() + 'px');
editorObj
.css('height', ((win.height() - toolbar.height()) - 25) + 'px');
editorObj.height(win.height() - toolbar.height());
}
})
.resize();
}).resize();
//adds wiki command buttons (save, cancel, preview) from fullscreen view
$('#role_main .actions').clone().appendTo('.CodeMirror-fullscreen');
$('.actions', '#col1').clone().appendTo('.CodeMirror-fullscreen');
} else {
editorObj.resizable( "enable" );
$(window).removeData('cm-resize');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment