Bugzilla – Attachment 101554 Details for
Bug 16457
Remove the use of "onclick" from the patron entry form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16457: (follow-up) Enable click event on dynamically-created elements
Bug-16457-follow-up-Enable-click-event-on-dynamica.patch (text/plain), 1.84 KB, created by
Owen Leonard
on 2020-03-24 12:20:38 UTC
(
hide
)
Description:
Bug 16457: (follow-up) Enable click event on dynamically-created elements
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-03-24 12:20:38 UTC
Size:
1.84 KB
patch
obsolete
>From c645f9c8d1facda1f3760ddac9932e5938948461 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 24 Mar 2020 12:14:21 +0000 >Subject: [PATCH] Bug 16457: (follow-up) Enable click event on > dynamically-created elements > >This patch moves the click handler for patron attribute actions ("new", >"clear") from the links themselves to the container. This allows jQuery >to correctly target dynamically-created copies of the links. > >To test you should have extended patron attributes enabled and you >should have some repeatable attributes defined. > > - Create or edit a patron record > - In the "Additional attributes and identifiers" section, test the > "Clear" and "New" links. Confirm that the controls work with both the > original instance of the field and those created by clicking "New." >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index d21a4af434..89fe78f993 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1650,12 +1650,12 @@ legend:hover { > $('#debarred_expiration').val(""); > }); > >- $(".clear_attribute").on("click", function(e){ >+ $("#memberentry_patron_attributes").on("click", ".clear_attribute", function(e){ > e.preventDefault(); > clear_entry( this ); > }); > >- $(".clone_attribute").on("click", function(e){ >+ $("#memberentry_patron_attributes").on("click", ".clone_attribute", function(e){ > e.preventDefault(); > clone_entry( this ); > }); >-- >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 16457
:
100971
|
101391
|
101554
|
101770
|
101771