lib/riemann/dash/public/toolbar.js in riemann-dash-0.2.12 vs lib/riemann/dash/public/toolbar.js in riemann-dash-0.2.13

- old
+ new

@@ -1,10 +1,18 @@ var toolbar = (function() { // Build UI var toolbar = $('#toolbar'); var form = $('<form/>'); toolbar.append(form); + + // Method to adjust the position of the view div + var sizeAdjust = function() { + $('#view').css('top', toolbar.height() + "px"); + }; + $( window ).resize(function() { + sizeAdjust(); + }); var pager = $('<div class="pager">'); var load = $('<div class="load"><div class="bar load1" /><div class="bar load5" /><span title="1- and 5-second subscription manager load averages">Load</span></div>'); var server = $('<input class="server" type="text" name="text">'); var server_type = $('<div class="server"><label><input type="radio" id="ws" name="server_type" value="ws" checked>websockets</label><input type="radio" id="sse" name="server_type" value="sse">sse</label></div>'); @@ -132,9 +140,10 @@ f(); }); }); pager.append(add); + sizeAdjust(); }; // Returns a tile for a workspace. var workspaceTile = function(workspace) { var tile = $('<li class="button" />');