Module: check_mk
Branch: master
Commit: 5b78a42660db55cbf76c8ae9a6cd82e31684e52e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b78a42660db55…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 25 15:03:34 2012 +0200
FIX: Fixed a lot of css/js errors
---
ChangeLog | 1 +
web/htdocs/htmllib.py | 7 +++++--
web/htdocs/js/checkmk.js | 7 ++++---
web/htdocs/views.py | 2 +-
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4197261..0b519b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@
when it comes to executing commands
* FIX: Fixed styling issues of view filters with dropdown fields
* FIX: multisite login can now deal with empty lines in htpasswd
+ * FIX: Fixed a bunch of js/css errors
Mobile:
* FIX: Fixed logtime filter settings in all mobile views
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index f802712..820c78f 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -619,8 +619,11 @@ class html:
id = "cb_" + varname
if id:
add_attr.append('id="%s"' % id)
+ add_attr_code = ''
+ if add_attr:
+ add_attr_code = ' ' + ' '.join(add_attr)
self.write("<input type=checkbox
name=\"%s\"%s%s%s%s>\n" %
- (varname, checked, cssclass, onclick_code, "
".join(add_attr)))
+ (varname, checked, cssclass, onclick_code, add_attr_code))
self.form_vars.append(varname)
if label:
self.write('<label for="%s">%s</label>\n' %
(id, label))
@@ -916,7 +919,7 @@ class html:
if text and text.strip():
self.have_help = True
self.write('<div class=help style="display: %s">' %
(
- not self.help_visible and "none" or ""))
+ not self.help_visible and "none" or
"block"))
self.write(text.strip())
self.write('</div>')
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 5ab75af..6078503 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -295,15 +295,16 @@ function filter_activation(oSelect)
oDiv.setAttribute("class", "filtersetting " + usage);
var disabled = usage != "hard" && usage != "show";
- for (var i in oTd.childNodes) {
- oNode = oTd.childNodes[i];
+ var oNode;
+ for (var i in oDiv.childNodes) {
+ oNode = oDiv.childNodes[i];
if (oNode.tagName == "INPUT" || oNode.tagName == "SELECT") {
oNode.disabled = disabled;
}
}
p = null;
- oTd = null;
+ oDiv = null;
oSelect = null;
}
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index cda5f13..5635f3e 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -613,7 +613,7 @@ def page_edit_view():
html.write("<script language=\"javascript\">\n")
for fname, filt in allowed_filters.items():
if fname not in ubiquitary_filters:
- html.write("filter_activation(\"filter_%s\");\n" %
fname)
+
html.write("filter_activation(document.getElementById(\"filter_%s\"));\n"
% fname)
html.write("</script>\n")