Module: check_mk
Branch: master
Commit: 865fbd86089b40103ca65b60f09b3960b98645fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=865fbd86089b40…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 24 13:43:24 2012 +0200
FIX: fix sometimes-broken sizing of sidebar and dashboard on Chrome
---
ChangeLog | 1 +
web/htdocs/dashboard.py | 1 +
web/htdocs/sidebar.py | 3 ++-
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 17c6bf1..66e1e96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* FIX: disable checkbox button in non-checkboxable layouts
* FIX: fix table layout for views (gaps where missing sometimes)
* FIX: Fixed sorting views by perfdata values which contain floats
+ * FIX: fix sometimes-broken sizing of sidebar and dashboard on Chrome
Mobile:
* FIX: Fixed logtime filter settings in all mobile views
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 99b3c17..eec2183 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -154,6 +154,7 @@ var refresh_dashlets = %r;
var dashboard_name = '%s';
set_dashboard_size();
window.onresize = function () { set_dashboard_size(); }
+window.onload = function () { set_dashboard_size(); }
dashboard_scheduler(1);
""" % (header_height, screen_margin, title_height, dashlet_padding,
corner_overlap, refresh_dashlets, name))
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 3010413..d37c239 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -146,7 +146,7 @@ def page_side():
if not config.may("see_sidebar"):
return
html.html_head(_("Check_MK Sidebar"), javascripts=["sidebar"],
stylesheets=["sidebar", "status"])
- html.write('<body class="side" onload="initScrollPos()"
onunload="storeScrollPos()">\n')
+ html.write('<body class="side" onload="initScrollPos();
setSidebarHeight();" onunload="storeScrollPos()">\n')
html.write('<div id="check_mk_sidebar">\n')
views.load_views()
@@ -180,6 +180,7 @@ def page_side():
html.write("restart_snapins = %r;\n" % restart_snapins)
html.write("sidebar_scheduler();\n")
html.write("window.onresize = function() { setSidebarHeight(); }\n")
+ # html.write("window.onload = function() { setSidebarHeight(); }\n")
html.write("</script>\n")
# html.write("</div>\n")