Module: check_mk
Branch: master
Commit: ed3fea7ab39e39f13088202ae3a494f84272a865
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed3fea7ab39e39…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 13:28:00 2016 +0100
Cleanup ; Fixed bug in previous change
---
web/htdocs/sidebar.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 55bc832..1a9fd21 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -306,14 +306,15 @@ def render_snapin(name, state):
html.write("<div id=\"snapin_container_%s\"
class=snapin>\n" % name)
# When not permitted to open/close snapins, the snapins are always opened
- if state == "closed" and
config.may("general.configure_sidebar"):
- style = ' style="display:none"'
- headclass = "closed"
- minimaxi = "maxi"
- else:
+ if state == "open" or not
config.may("general.configure_sidebar"):
style = ""
headclass = "open"
minimaxi = "mini"
+ else:
+ style = ' style="display:none"'
+ headclass = "closed"
+ minimaxi = "maxi"
+
toggle_url = "sidebar_openclose.py?name=%s&state=" % name
html.write('<div class="head %s" ' % headclass)
@@ -344,7 +345,7 @@ def render_snapin(name, state):
if config.may("general.configure_sidebar"):
toggle_actions = "
onclick=\"toggle_sidebar_snapin(this,'%s')\"" \
"
onmouseover=\"this.style.cursor='pointer'\"" \
- " onmouseout=\"this.style.cursor='auto'"
% toggle_url
+ "
onmouseout=\"this.style.cursor='auto'\"" % toggle_url
else:
toggle_actions = ""
html.write("<b class=heading%s>%s</b>" % (toggle_actions,
snapin["title"]))