Module: check_mk
Branch: master
Commit: b75dabc039dfcc64fdffc114128c5e6f4d6a3eff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b75dabc039dfcc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 17 16:13:24 2012 +0200
Fixed js eror in IE7 on WATO host edit page
---
.bugs/653 | 8 +++++-
web/htdocs/js/wato.js | 51 +++++++++++++++++++++++++-----------------------
2 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/.bugs/653 b/.bugs/653
index 453180e..c09d1d4 100644
--- a/.bugs/653
+++ b/.bugs/653
@@ -1,10 +1,14 @@
Title: bulk inventory in omd shared mode
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-02-14 16:06:33
Targetversion: future
-Class: bug
At the moment the message about modifying the /etc/sudoers file is shown
on every cmk --automation problem during inventory. This is misleading.
The message should only occur when the entries are really missing in /etc/sudoers
+
+2012-04-17 16:00:21: changed state open -> done
+Has just been fixed. The sudo hint message is only shown when the sudo command fails
"sudo:
+" in error message.
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index 42a9eb0..542d1d1 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -139,32 +139,35 @@ function wato_fix_visibility() {
}
var oTr = document.getElementById("attr_" + attrname);
- oTr.style.display = display;
-
- // Prepare current visibility information which is used
- // within the attribut validation in wato
- // Hidden attributes are not validated at all
- if ( !document.getElementById("attr_display_" + attrname) ){
- var newInput = document.createElement("input");
- newInput.name = "attr_display_" + attrname;
- newInput.id = "attr_display_" + attrname;
- newInput.type = "hidden";
- newInput.className = "text";
- oTr.appendChild(newInput);
- }
- var display_info = document.getElementById("attr_display_" + attrname)
- if ( display == "none" ) {
- display_info.value = "0";
- }else{
- display_info.value = "1";
- }
-
- // There is at least one item in this topic -> show it
- var topic = oTr.parentNode.parentNode.parentNode.id.substr(21);
- if( display == "" ){
- var index = hide_topics.indexOf(topic);
- if( index != -1 )
- delete hide_topics[index];
+ if(oTr) {
+ oTr.style.display = display;
+
+ // Prepare current visibility information which is used
+ // within the attribut validation in wato
+ // Hidden attributes are not validated at all
+ oAttrDisp = document.getElementById("attr_display_" + attrname);
+ if (!oAttrDisp){
+ var newInput = document.createElement("input");
+ newInput.name = "attr_display_" + attrname;
+ newInput.id = "attr_display_" + attrname;
+ newInput.type = "hidden";
+ newInput.className = "text";
+ oTr.appendChild(newInput);
+ }
+ if ( display == "none" ) {
+ oAttrDisp.value = "0";
+ } else {
+ oAttrDisp.value = "1";
+ }
+ oAttrDisp = null;
+
+ // There is at least one item in this topic -> show it
+ var topic = oTr.parentNode.parentNode.parentNode.id.substr(21);
+ if( display == "" ){
+ var index = hide_topics.indexOf(topic);
+ if( index != -1 )
+ delete hide_topics[index];
+ }
}
}
for (var item in volatile_topics){