Bugzilla – Attachment 140810 Details for
Bug 30975
Use event delegation for framework plugins to avoid using private jQuery method _data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30975: Fix framework plugins on cloned fields/subfields
[22.05] Bug-30975-Fix-framework-plugins-on-cloned-fieldssu.patch (text/plain), 1.53 KB, created by
David Nind
on 2022-09-20 22:07:13 UTC
(
hide
)
Description:
Bug 30975: Fix framework plugins on cloned fields/subfields
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-20 22:07:13 UTC
Size:
1.53 KB
patch
obsolete
>From c7fcdd38dfd5fb6dc2f545eee7dd47879f14ee8a Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 20 Sep 2022 11:27:20 +0200 >Subject: [PATCH] Bug 30975: Fix framework plugins on cloned fields/subfields > >This patch uses the internal method jQuery._data to retrieve and >clone all events attached to a cloned field/subfield. >It's intended for stable releases only, so they can stay compatible with >existing plugins > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >index 16cf857496..44f1bbfbeb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >@@ -431,9 +431,8 @@ function AddEventHandlers (oldcontrol, newcontrol, newinputid ) { > // This function is a helper for CloneField and CloneSubfield. > // It adds the event handlers from oldcontrol to newcontrol. > // newinputid is the id attribute of the cloned controlling input field >-// Note: This code depends on the jQuery data for events; this structure >-// is moved to _data as of jQuery 1.8. >- var ev= $(oldcontrol).data('events'); >+// Note: This code depends on the jQuery internal method _data which is not recommended >+ var ev = jQuery._data(oldcontrol, 'events') > if(typeof ev != 'undefined') { > $.each(ev, function(prop,val) { > $.each(val, function(prop2,val2) { >-- >2.30.2
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 30975
:
136135
|
138318
|
140763
|
140810
|
146146
|
146817
|
158064
|
170499
|
170500
|
171513
|
171514
|
175432
|
175433
|
175434
|
175435
|
175436
|
175437
|
177612
|
177613
|
177614
|
177615
|
177616
|
177719
|
177720
|
177721
|
177722
|
177723