From a197ed079d777af7d92dff4c2a3646652c637b16 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. --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 2 +- .../intranet-tmpl/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 1493801..2f06949 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4293,7 +4293,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 503cfbf..a777dda 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.1.4