diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js index afe46f12c3..8ccb8c43f8 100644 --- a/zephyr/static/js/ui.js +++ b/zephyr/static/js/ui.js @@ -267,23 +267,19 @@ function need_skinny_mode() { function get_new_heights() { var res = {}; + var viewport_height = viewport.height(); + var top_navbar_height = $("#top_navbar").height(); - res.bottom_whitespace_height = - viewport.height() * 0.4; + res.bottom_whitespace_height = viewport_height * 0.4; - res.main_div_min_height = - viewport.height() - - $("#top_navbar").height(); + res.main_div_min_height = viewport_height - top_navbar_height; - res.bottom_sidebar_height = - viewport.height() - - $("#top_navbar").height() + res.bottom_sidebar_height = viewport_height - top_navbar_height - $(".upper_sidebar").height() - 40; res.right_sidebar_height = - viewport.height() - - $("#top_navbar").height() + viewport_height - top_navbar_height - $("#notifications-area").height() - 14 // margin for right sidebar - 10; // padding on notifications bar