always show checkboxes" is enabled
Message-ID: <56533717.MourHTa9UdwiJsxG%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 3a096a8cd7660ee9d39a33dbea09b10a0cf7ce8e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a096a8cd7660e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 23 16:55:53 2015 +0100
#2846 FIX View refresh could reset checkboxes on views where "always show
checkboxes" is enabled
---
.werks/2846 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 3 +++
web/htdocs/views.py | 4 ++--
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2846 b/.werks/2846
new file mode 100644
index 0000000..83f0440
--- /dev/null
+++ b/.werks/2846
@@ -0,0 +1,10 @@
+Title: View refresh could reset checkboxes on views where "always show
checkboxes" is enabled
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1448294124
+
+
diff --git a/ChangeLog b/ChangeLog
index 532814a..44c8f85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -120,6 +120,7 @@
* 2758 FIX: Fixed processing of metrics containing varnames with quotes and/or
spaces
* 2762 FIX: Fixed formating of check_http when using "clickable URL"
option
* 2772 FIX: Fixed possible exception in icon column when showing some actions in the
column...
+ * 2846 FIX: View refresh could reset checkboxes on views where "always show
checkboxes" is enabled
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 8b0bcab..dd931c3 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1097,6 +1097,9 @@ function do_reload(url)
if (window.location.href.indexOf("dashboard_dashlet.py") != -1)
params["_reload"] = "1";
+ if (g_selection_enabled)
+ params["selection"] = g_selection;
+
call_ajax(makeuri(params), {
response_handler : handle_content_reload,
error_handler : handle_content_reload_error,
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index fe3c695..c132678 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1521,12 +1521,12 @@ def show_context_links(thisview, show_filters, display_options,
hidden = not enable_commands)
togglebutton_off("commands", "commands", hidden =
enable_commands)
- selection_enabled = enable_commands and enable_checkboxes
+ selection_enabled = (enable_commands and enable_checkboxes) or
thisview.get("force_checkboxes")
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)
+ togglebutton_off("checkbox", "checkbox", hidden = not
thisview.get("force_checkboxes"))
html.javascript('g_selection_enabled = %s;' % (selection_enabled and
'true' or 'false'))
if 'O' in display_options: