Module: check_mk
Branch: master
Commit: d7956582413ef45730438cd24ef9b694c3ba3017
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d7956582413ef4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 27 11:46:54 2016 +0100
#2970 FIX Users now allowed to modify the sidebar (e.g. guests) can now not fold snapins
anymore
---
.bugs/2385 | 7 +++++--
.werks/2970 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/sidebar.py | 25 +++++++++++++++----------
4 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/.bugs/2385 b/.bugs/2385
index 7135b9f..036c7db 100644
--- a/.bugs/2385
+++ b/.bugs/2385
@@ -1,8 +1,11 @@
Title: Resize of sidebar while zooming not working on all versions of Chromium browser
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2015-11-02 11:10:57
Targetversion: future
-Class: bug
This happens on Ubuntu 14.04 with Version 44.0.2403.89 Ubuntu 14.04 (64-bit).
+
+2016-01-27 11:25:10: changed state open -> done
+fixed.
diff --git a/.werks/2970 b/.werks/2970
new file mode 100644
index 0000000..8483f4e
--- /dev/null
+++ b/.werks/2970
@@ -0,0 +1,9 @@
+Title: Users now allowed to modify the sidebar (e.g. guests) can now not fold snapins
anymore
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453891578
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 6cae073..2dda256 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -270,6 +270,7 @@
* 2967 FIX: Hosts/Services: Hiding action menu trigger for empty menus
* 2968 FIX: Closing quicksearch results when moving mouse out of sidebar area
* 2969 FIX: Fixed folding of sidebar in Google Chrome
+ * 2970 FIX: Users now allowed to modify the sidebar (e.g. guests) can now not fold
snapins anymore
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index a129a71..55bc832 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -305,7 +305,8 @@ def render_snapin(name, state):
render_snapin_styles(snapin)
html.write("<div id=\"snapin_container_%s\"
class=snapin>\n" % name)
- if state == "closed":
+ # 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"
@@ -326,13 +327,13 @@ def render_snapin(name, state):
html.write(">")
- # Icon for mini/maximizing, does not need permission
- html.write('<div class="minisnapin">')
- iconbutton(minimaxi + "snapin", None,
- "side", "toggle_sidebar_snapin(this, '%s')" %
toggle_url, 'snapin_'+name)
- html.write('</div>')
-
if config.may("general.configure_sidebar"):
+ # Icon for mini/maximizing
+ html.write('<div class="minisnapin">')
+ iconbutton(minimaxi + "snapin", None,
+ "side", "toggle_sidebar_snapin(this,
'%s')" % toggle_url, 'snapin_'+name)
+ html.write('</div>')
+
# Button for closing (removing) a snapin
html.write('<div class="closesnapin">')
iconbutton("closesnapin",
"sidebar_openclose.py?name=%s&state=off" % name,
@@ -340,9 +341,13 @@ def render_snapin(name, state):
html.write('</div>')
# The heading. A click on the heading mini/maximizes the snapin
- html.write("<b class=heading
onclick=\"toggle_sidebar_snapin(this,'%s')\" "
- "onmouseover=\"this.style.cursor='pointer'\"
"
-
"onmouseout=\"this.style.cursor='auto'\">%s</b>" %
(toggle_url, snapin["title"]))
+ 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
+ else:
+ toggle_actions = ""
+ html.write("<b class=heading%s>%s</b>" % (toggle_actions,
snapin["title"]))
# End of header
html.write("</div>")