From 4a24523c10f24706781ef4405f8c8881babeb5e3 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 10 Jun 2013 21:29:46 -0500 Subject: [PATCH] fixed vertical scroll issue with editor, thanks LightDot --- VERSION | 2 +- applications/admin/static/css/styles.css | 3 ++- applications/admin/views/default/edit.html | 14 +++++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/VERSION b/VERSION index 674c515e..8f500768 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.5.1-stable+timestamp.2013.06.10.06.18.59 +Version 2.5.1-stable+timestamp.2013.06.10.21.28.53 diff --git a/applications/admin/static/css/styles.css b/applications/admin/static/css/styles.css index cfdb5235..4dc49d1c 100644 --- a/applications/admin/static/css/styles.css +++ b/applications/admin/static/css/styles.css @@ -1304,4 +1304,5 @@ a[rel='tooltip'] span{background:#9fb364;color:#eef1d9;border:1px solid #eef1d9; .shell .prompt,.shell #output,.shell pre,.shell #caret{font-family:monospace;} .shell a[rel="tooltip"]{margin-left:8px;} .shell .clearfix{clear:both;} -.shell #caret{padding-top:9px;} \ No newline at end of file +.shell #caret{padding-top:9px;} +.small-font {font-size: 0.8em; white-space: nowrap} \ No newline at end of file diff --git a/applications/admin/views/default/edit.html b/applications/admin/views/default/edit.html index 914c5b06..c4a5ff42 100644 --- a/applications/admin/views/default/edit.html +++ b/applications/admin/views/default/edit.html @@ -109,17 +109,14 @@ jQuery(document).on('click', '#themes a', function (e) { return window.innerHeight || (document.documentElement || document.body).clientHeight; } function setFullScreen(instance, full) { - var wrap = instance.getWrapperElement(), scroll = instance.getScrollerElement(); + var wrap = instance.getWrapperElement() if (full) { wrap.className += " CodeMirror-fullscreen"; - jQuery(wrap).css('width', "100%"); - jQuery(wrap).css('position', "absolute"); - scroll.style.height = winHeight() + "px"; + wrap.style.height = winHeight() + "px"; document.documentElement.style.overflow = "hidden"; } else { wrap.className = wrap.className.replace(" CodeMirror-fullscreen", ""); - jQuery(wrap).css('position', "relative"); - scroll.style.height = ""; + wrap.style.height = ""; document.documentElement.style.overflow = ""; } instance.refresh(); @@ -127,8 +124,7 @@ jQuery(document).on('click', '#themes a', function (e) { CodeMirror.on(window, "resize", function() { var showing = document.body.getElementsByClassName("CodeMirror-fullscreen")[0]; if (!showing) return; - console.log('CodeMirror.connect()',winHeight() ); - showing.CodeMirror.getScrollerElement().style.height = winHeight() + "px"; + showing.CodeMirror.getWrappererElement().style.height = winHeight() + "px"; }); {{if len(request.args) > 1:}} @@ -168,7 +164,7 @@ jQuery(document).on('click', '#themes a', function (e) { {{for dir in dirs:}}
  • -