Module: check_mk
Branch: master
Commit: c8e2df934d32fcde51abbbeaa36c7680dbe2695e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c8e2df934d32fc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 28 10:10:44 2014 +0100
FIX Fixed availability filters not opening in IE7
---
.werks/762 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 22 ++++++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/.werks/762 b/.werks/762
new file mode 100644
index 0000000..2fdbfd2
--- /dev/null
+++ b/.werks/762
@@ -0,0 +1,9 @@
+Title: Fixed availability filters not opening in IE7
+Level: 2
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1395997821
+
+
diff --git a/ChangeLog b/ChangeLog
index 7e22dec..e900da7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -286,6 +286,7 @@
* 0558 FIX: availability: fixed exception on specific filter settings...
* 0712 FIX: Fix multiple groups with same tag when grouping hosts after a tag...
* 0738 FIX: csv_export: now able to handle umlauts in download filenames...
+ * 0762 FIX: Fixed availability filters not opening in IE7
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 7011f9f..a3c17a9 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -106,6 +106,28 @@ if (!document.getElementsByClassName) {
}
}
+// Again, some IE 7 fun: The IE7 mixes up name and id attributes of objects.
+// When using getElementById() where we really only want to match objects by
+// their id, the clever IE7 also searches objects by their names, wow. crap.
+if (navigator.appVersion.indexOf("MSIE 7.") != -1)
+{
+ document._getElementById = document.getElementById;
+ document.getElementById = function(id) {
+ var e = document._getElementById(id);
+ if (e) {
+ if (e.attributes['id'].value == id)
+ return e;
+ else {
+ for (var i = 1; i < document.all[id].length; i++) {
+ if(document.all[id][i].attributes['id'].value == id)
+ return document.all[id][i];
+ }
+ }
+ }
+ return null;
+ };
+}
+
function getTarget(event) {
return event.target ? event.target : event.srcElement;
}