Module: check_mk
Branch: master
Commit: fff4b03b9b88871db08ca7cfad986b781ef39fe9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fff4b03b9b8887…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 27 10:41:43 2015 +0100
#2778 FIX Fixed correct scaling of sidebar on newer versions of Chrome browser
---
.werks/2778 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/js/sidebar.js | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2778 b/.werks/2778
new file mode 100644
index 0000000..8c9cc7c
--- /dev/null
+++ b/.werks/2778
@@ -0,0 +1,9 @@
+Title: Fixed correct scaling of sidebar on newer versions of Chrome browser
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1448617270
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index cae7f8c..33cb10a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,7 @@
* 2762 FIX: Fixed formating of check_http when using "clickable URL"
option
* 2772 FIX: Fixed possible exception in icon column when showing some actions in the
column...
* 2846 FIX: View refresh could reset checkboxes on views where "always show
checkboxes" is enabled
+ * 2778 FIX: Fixed correct scaling of sidebar on newer versions of Chrome browser
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js
index 2d64cf3..c17ec7a 100644
--- a/web/htdocs/js/sidebar.js
+++ b/web/htdocs/js/sidebar.js
@@ -408,7 +408,10 @@ function setSidebarHeight() {
if (isWebkit()) {
var oldcols = parent.document.body.cols.split(",");
var oldwidth = parseInt(oldcols[0]);
- var width = oHeader.clientWidth;
+ var width = parent.frames[0].pageWidth();
+ // Note: previously this was "var width = oHeader.clientWidth;" and
worked
+ // fine. It stopped working - probably with new Chrome versions. We do not
+ // know yet if the new way also works on old Chrome versions.
var target_width = parseInt(oldwidth * 280.0 / width);
var newcols = target_width.toString() + ",*";
parent.document.body.cols = newcols;