Bugzilla – Attachment 87670 Details for
Bug 22553
Unchecking a subpermission does not uncheck the top level permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22553: Unchecking a subpermission does not uncheck the top level permission
Bug-22553-Unchecking-a-subpermission-does-not-unch.patch (text/plain), 2.46 KB, created by
Katrin Fischer
on 2019-04-09 18:49:55 UTC
(
hide
)
Description:
Bug 22553: Unchecking a subpermission does not uncheck the top level permission
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-09 18:49:55 UTC
Size:
2.46 KB
patch
obsolete
>From 5dd7d04ac072bbd9b5c7f839bafd8f13f71c99f2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 9 Apr 2019 13:21:08 +0000 >Subject: [PATCH] Bug 22553: Unchecking a subpermission does not uncheck the > top level permission > >This patch makes a minor change to the set permissions page's JavaScript >so that unchecking a subpermission will uncheck the top level >permission. > >To test, apply the patch and open the "Set permissions" page for a >patron. > > - Expand a permission with multiple subpermissions. > - Check the top level permission. All subpermissions should be checked. > - Uncheck one of the subpermissions. The top level permission should > now be unchecked. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/members/member-flags.tt | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >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 a777ddae2e..6c65d69039 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 >@@ -195,13 +195,17 @@ > > $(".flag").on("change",function(e){ > e.preventDefault(); >- var bit = $(this).data("bit"); >- if( $(this).is(":checked") ){ >- $("#flag-" + bit + "-children").show().find(".flag").prop("checked", true); >- $(".toggle-" + bit + ".togglechildren_on").hide(); >- $(".toggle-" + bit + ".togglechildren_off").show(); >+ if( $(this).hasClass("child") ){ >+ $(this).closest(".parent").find(".flag.parent").prop("checked", false); > } else { >- $("#flag-" + bit + "-children").show().find(".flag").prop("checked", false); >+ var bit = $(this).data("bit"); >+ if( $(this).is(":checked") ){ >+ $("#flag-" + bit + "-children").show().find(".flag").prop("checked", true); >+ $(".toggle-" + bit + ".togglechildren_on").hide(); >+ $(".toggle-" + bit + ".togglechildren_off").show(); >+ } else { >+ $("#flag-" + bit + "-children").show().find(".flag").prop("checked", false); >+ } > } > }); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22553
:
87606
|
87607
| 87670