Module: check_mk
Branch: master
Commit: 3c8b1bdabbbdb27966f81a3f86ac81bcb2feaa9d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c8b1bdabbbdb2…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jun 18 22:20:51 2012 +0200
WATO: fixed topic visibility in editfolder/bulkedit mode
---
web/htdocs/js/wato.js | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index 5bf8df0..f83c5a0 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -186,15 +186,22 @@ function wato_fix_visibility() {
}
}
- var form_edithost = document.getElementById("form_edithost");
- for (var child in form_edithost.childNodes){
- oTr = form_edithost.childNodes[child];
- if (oTr.className == "nform"){
- if( hide_topics.indexOf(oTr.childNodes[0].childNodes[0].textContent) > -1
)
- oTr.style.display = "none";
- else
- oTr.style.display = "";
- }
+ // FIXME: use generic identifier for each form
+ var available_forms = [ "form_edithost", "form_editfolder",
"form_bulkedit" ];
+ for ( var try_form in available_forms ){
+ var my_form = document.getElementById(available_forms[try_form]);
+ if (my_form != null) {
+ for (var child in my_form.childNodes){
+ oTr = my_form.childNodes[child];
+ if (oTr.className == "nform"){
+ if( hide_topics.indexOf(oTr.childNodes[0].childNodes[0].textContent)
> -1 )
+ oTr.style.display = "none";
+ else
+ oTr.style.display = "";
+ }
+ }
+ break;
+ }
}
}