From 9170effb27dee076ac7401a34f0e857be50330eb Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 6 Nov 2014 15:09:44 +0000 Subject: [PATCH] working redraw and draw on startup --- src/static/js/pad.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 73fcd3d6..5292e75d 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -370,6 +370,18 @@ function handshake() $('#readonlyinput').on('click',function(){ padeditbar.setEmbedLinks(); }); + // Listen for resize events (sucks but needed as iFrame ace_inner has to be position absolute + // A CSS fix for this would be nice but I'm not sure how we'd do it. + $(window).resize(function(){ + redrawEditbar(); + }); + redrawEditbar(); +} + +var redrawEditbar = function(){ + var height = $('.menu_left').height() + 4 + "px"; + $('#editbar').css("height", height); + $('#editorcontainer').css("top", height); } $.extend($.gritter.options, { @@ -937,4 +949,3 @@ exports.handshake = handshake; exports.pad = pad; exports.init = init; exports.alertBar = alertBar; -