Module: check_mk
Branch: master
Commit: 7ce79c93020b94f84b37f7585512b46a37515e9a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ce79c93020b94…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 9 10:11:50 2011 +0200
FIX: IE<9: Fixed problem with checkbox events when editing a host
---
ChangeLog | 1 +
web/htdocs/htmllib.py | 7 ++++---
web/htdocs/wato.py | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 97eda78..6e876a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
WATO:
* FIX: "bulk move to" at the top of wato hostlists works again
+ * FIX: IE<9: Fixed problem with checkbox events when editing a host
1.1.11i4:
Core, Setup, etc.:
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index db65988..d62e86d 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -384,7 +384,7 @@ class html:
(varname, value, checked_text, text))
self.form_vars.append(varname)
- def checkbox(self, varname, deflt="", cssclass = '',
onchange=None):
+ def checkbox(self, varname, deflt="", cssclass = '', onclick =
None):
error = self.user_errors.get(varname)
if error:
html = "<x class=inputerror>"
@@ -404,8 +404,9 @@ class html:
checked = ""
if cssclass:
cssclass = ' class="%s"' % cssclass
- onchange_code = onchange and " onchange=\"%s\"" % (onchange)
or ""
- self.write("<input type=checkbox name=\"%s\"%s%s%s>" %
(varname, checked, cssclass, onchange_code))
+ onclick_code = onclick and " onclick=\"%s\"" % (onclick) or
""
+ self.write("<input type=checkbox name=\"%s\"%s%s%s>" %
+ (varname, checked, cssclass, onclick_code))
self.form_vars.append(varname)
if error:
html += "</x>"
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f14a742..93536bc 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3192,7 +3192,7 @@ def configure_attributes(hosts, for_what, parent, myself=None,
without_attribute
html.hidden_field(checkbox_name, "on")
else:
html.checkbox(checkbox_name, active,
- onchange="wato_toggle_attribute(this, '%s');" %
attrname ) # Only select if value is unique
+ onclick = "wato_toggle_attribute(this, '%s');" %
attrname ) # Only select if value is unique
html.write("</td>")
# Now comes the input fields and the inherited / default values