Skip to content

Commit

Permalink
Merge pull request #112 from soundslikeodd/feature/toolbar-hight-adju…
Browse files Browse the repository at this point in the history
…stment-dynamic

Dynamically adjusted position of view
  • Loading branch information
Marc Fournier committed Feb 8, 2016
2 parents 9eda3f9 + 6798a97 commit db7ccb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/riemann/dash/public/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ var toolbar = (function() {
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>');
Expand Down Expand Up @@ -134,6 +142,7 @@ var toolbar = (function() {
});

pager.append(add);
sizeAdjust();
};

// Returns a tile for a workspace.
Expand Down
2 changes: 1 addition & 1 deletion lib/riemann/dash/views/css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ html,table {
}

#toolbar {
height: 28px;
height: auto;
overflow: hidden;
position: absolute;
top: 3px;
Expand Down

0 comments on commit db7ccb5

Please sign in to comment.