Module: check_mk
Branch: master
Commit: 42f4c07e0a32353c89b65adc99d908d5bdc1e1b8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42f4c07e0a3235…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 24 08:21:22 2017 +0200
Fixed JS error when toggling hw/sw inventory trees
Change-Id: I291e18ea8cef10ecea781ed7704c79683813cefe
---
web/htdocs/htmllib.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 5dd2275..482610e 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -2560,13 +2560,15 @@ class html(HTMLGenerator, RequestHandler):
onclick = "toggle_foldable_container(\'%s\', \'%s\',
\'%s\')"\
% (treename, id, fetch_url if fetch_url else '')
+ img_id = "treeimg.%s.%s" % (treename, id)
+
if indent == "nform":
self.open_tr(class_="heading")
self.open_td(id_="nform.%s.%s" % (treename, id), onclick=onclick,
colspan="2")
if icon:
self.img(class_=["treeangle", "title"],
src="images/icon_%s.png" % icon)
else:
- self.img(class_=["treeangle", "nform",
"open" if isopen else "closed"],
+ self.img(id_=img_id, class_=["treeangle", "nform",
"open" if isopen else "closed"],
src="images/%s_closed.png" % tree_img,
align="absbottom")
self.write_text(title)
self.close_td()