Module: check_mk
Branch: master
Commit: 4dcb24eb7f9ac384a1eba46db6634e63df24f958
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4dcb24eb7f9ac3…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 12 11:56:17 2012 +0200
Fix in Dashboards if browser window to small
---
web/htdocs/js/dashboard.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/js/dashboard.js b/web/htdocs/js/dashboard.js
index 8836e52..c06f70f 100644
--- a/web/htdocs/js/dashboard.js
+++ b/web/htdocs/js/dashboard.js
@@ -44,6 +44,10 @@ function resize_dashlets(id, code)
// check if dashlet has title and resize its width
oDash = document.getElementById("dashlet_title_" + d_number);
if (oDash) {
+ //if browser window to small prevent js error
+ if(d_width <= 20){
+ d_width = 21;
+ }
oDash.style.width = d_width - 20 + "px";
/* oDash.style.top = "-" + title_height + "px";
oDash.style.height = title_height + "px"; */