From d58d61abff146b9b33b651f6486e580e0f5a5462 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Jan 2019 15:37:15 +0000 Subject: [PATCH] Bug 11375: (follow-up) Add links to show all/hide all This patch adds links in the toolbar to show or hide all sub-permissions. To test, apply the patch and view the permissions page for a patron. Clicking the "Show all" or "Hide all" links should work to show or hide all sub-permissions. The corresponding "Show details" and "Hide details" links for each permission set should be correctly toggled. Signed-off-by: Maryse Simard Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/css/src/staff-global.scss | 2 +- .../prog/en/modules/members/member-flags.tt | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index d6fa56de99..ab2a4228e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4395,7 +4395,7 @@ span { } .permission-highlight { - background-color: #FFC; + background-color: #FFC !important; } .togglechildren_on, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt index 503cfbfc39..a777ddae2e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt @@ -31,6 +31,8 @@
Cancel + Show all + Hide all
Filter: @@ -166,6 +168,18 @@ } }); + + $(".toggleall_off, .toggleall_on").on('click', function(e) { + e.preventDefault(); + if( $(this).hasClass("toggleall_on")){ + $(".children,.togglechildren_off").show(); + $(".togglechildren_on").hide(); + } else { + $(".children,.togglechildren_off").hide(); + $(".togglechildren_on").show(); + } + }); + $(".togglechildren_off, .togglechildren_on").on('click', function(e) { e.preventDefault(); var bit = $(this).data("bit"); -- 2.39.5