Module: check_mk
Branch: master
Commit: 11bf9108c92c29481f4289adfe244389771d005c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=11bf9108c92c29…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 14 17:18:57 2013 +0100
Multisite: grey out checkbox button if checkboxes are forced
---
web/htdocs/views.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 9386859..1b7c118 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1464,7 +1464,7 @@ def render_view(view, rows, datasource, group_painters, painters,
# Take into account: permissions, display_options
row_count > 0 and command_form,
# Take into account: layout capabilities
- can_display_checkboxes, show_checkboxes,
+ can_display_checkboxes and not
view.get("force_checkboxes"), show_checkboxes,
# Show link to availability. This exists only for plain hosts
# and services table. The grouping tables have columns that
statehist
# is missing. That way some of the filters might fail.
@@ -1791,9 +1791,10 @@ def show_context_links(thisview, active_filters, show_filters,
display_options,
togglebutton_off("commands", "commands", hidden =
enable_commands)
selection_enabled = enable_commands and enable_checkboxes
- toggler("checkbox", "checkbox", _("Enable/Disable
checkboxes for selecting rows for commands"),
- "location.href='%s';" %
html.makeuri([('show_checkboxes', show_checkboxes and '0' or
'1')]),
- show_checkboxes, hidden = not selection_enabled)
+ if not thisview.get("force_checkboxes"):
+ toggler("checkbox", "checkbox", _("Enable/Disable
checkboxes for selecting rows for commands"),
+ "location.href='%s';" %
html.makeuri([('show_checkboxes', show_checkboxes and '0' or
'1')]),
+ show_checkboxes, hidden = True) # not selection_enabled)
togglebutton_off("checkbox", "checkbox", hidden =
selection_enabled)
html.javascript('g_selection_enabled = %s;' % (selection_enabled and
'true' or 'false'))