Module: check_mk
Branch: master
Commit: 6e9bda644374c7be5477f2be719dfb0a31b0d0c3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e9bda644374c7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 15 14:10:55 2011 +0100
FIX: fix row highlight in status GUI on IE 8
---
ChangeLog | 1 +
web/htdocs/js/check_mk.js | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 739f6a0..f9e7e9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -95,6 +95,7 @@
* FIX: event/log views: reverse sorting, so that newest entries
are shown first
* FIX: fix dashboard dashlet background on IE
+ * FIX: fix row highlight in status GUI on IE 8
Checks & Agents:
* FIX: lnx_if: assume interfaces as up if ethtool is missing or
diff --git a/web/htdocs/js/check_mk.js b/web/htdocs/js/check_mk.js
index 732208e..bc8a2fd 100644
--- a/web/htdocs/js/check_mk.js
+++ b/web/htdocs/js/check_mk.js
@@ -936,12 +936,13 @@ function lightenColor(color, val) {
return "#" + code.toUpperCase();
}
-function real_style(obj, attr) {
+function real_style(obj, attr, ieAttr) {
var st;
- if(document.defaultView && document.defaultView.getComputedStyle)
+ if(document.defaultView && document.defaultView.getComputedStyle) {
st = document.defaultView.getComputedStyle(obj, null).getPropertyValue(attr);
- else
- st = obj.currentStyle[attr];
+ } else {
+ st = obj.currentStyle[ieAttr];
+ }
if(typeof(st) == 'undefined') {
st = 'transparent';
@@ -953,7 +954,7 @@ function real_style(obj, attr) {
if(obj.tagName == 'TD'
&& obj.parentNode.row_num === undefined
&& (st == 'transparent' || st == 'rgba(0, 0, 0, 0)'))
- st = real_style(obj.parentNode, attr);
+ st = real_style(obj.parentNode, attr, ieAttr);
return st;
}
@@ -1002,7 +1003,7 @@ function highlight_row(elem, on) {
function highlight_elem(elem, on) {
// Find all elements below "elem" with a defined background-color and
change it
- var bg_color = real_style(elem, 'background-color');
+ var bg_color = real_style(elem, 'background-color',
'backgroundColor');
if(on) {
elem['hover_orig_bg'] = bg_color;
elem.style.backgroundColor = lightenColor(elem['hover_orig_bg'], -20);