Module: check_mk
Branch: master
Commit: 156bbaa445ca03e2e7af950d80d9fcc880f7019e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=156bbaa445ca03…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 25 10:50:00 2015 +0200
#2510 FIX Fixed sidebar frame scaling in chrome when using browser zoom
---
.werks/2510 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/js/sidebar.js | 44 ++++++++++++++++++++++----------------------
3 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/.werks/2510 b/.werks/2510
new file mode 100644
index 0000000..64c9238
--- /dev/null
+++ b/.werks/2510
@@ -0,0 +1,10 @@
+Title: Fixed sidebar frame scaling in chrome when using browser zoom
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1440492580
+
+
diff --git a/ChangeLog b/ChangeLog
index 70a7c22..f47e153 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -160,6 +160,7 @@
* 2375 FIX: prediction preview: automatically select valid prediction period
* 2509 FIX: Logwatch: Fixed exception when deleting a specific logfile on multiple
hosts
* 2538 FIX: Fix exception in PNP graph template where metric name contains colon
(e.g. omd_apache)...
+ * 2510 FIX: Fixed sidebar frame scaling in chrome when using browser zoom
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js
index 358a6e8..cf96479 100644
--- a/web/htdocs/js/sidebar.js
+++ b/web/htdocs/js/sidebar.js
@@ -390,7 +390,7 @@ function update_content_location() {
}
function debug(s) {
- window.parent.frames[1].document.write(s+'<br />');
+ window.parent.frames[1].document.write(s+'<br />');
}
@@ -399,30 +399,30 @@ function debug(s) {
// to be treated here.
var g_just_resizing = 0;
function setSidebarHeight() {
- var oHeader = document.getElementById('side_header');
- var oContent = document.getElementById('side_content');
- var oFooter = document.getElementById('side_footer');
- var height = pageHeight();
-
- // Resize sidebar frame on Chrome (and other webkit browsers)
- if (isWebkit()) {
- var oldcols = parent.document.body.cols.split(",");
- var oldwidth = parseInt(oldcols[0]);
- var width = oHeader.clientWidth;
- var target_width = oldwidth * 280.0 / width;
- var newcols = target_width.toString() + ",*";
- parent.document.body.cols = newcols;
- }
+ var oHeader = document.getElementById('side_header');
+ var oContent = document.getElementById('side_content');
+ var oFooter = document.getElementById('side_footer');
+ var height = pageHeight();
- // Don't handle zero heights
- if (height == 0)
- return;
+ // Resize sidebar frame on Chrome (and other webkit browsers)
+ if (isWebkit()) {
+ var oldcols = parent.document.body.cols.split(",");
+ var oldwidth = parseInt(oldcols[0]);
+ var width = oHeader.clientWidth;
+ var target_width = parseInt(oldwidth * 280.0 / width);
+ var newcols = target_width.toString() + ",*";
+ parent.document.body.cols = newcols;
+ }
+
+ // Don't handle zero heights
+ if (height == 0)
+ return;
- oContent.style.height = (height - oHeader.clientHeight - oFooter.clientHeight + 4) +
'px';
+ oContent.style.height = (height - oHeader.clientHeight - oFooter.clientHeight + 4) +
'px';
- oFooter = null;
- oContent = null;
- oHeader = null;
+ oFooter = null;
+ oContent = null;
+ oHeader = null;
}
var scrolling = true;