From 92a489a588507b7a2ed3f39734f8a0425fb52382 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 915b93d..67a78f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4346,7 +4346,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