Bugzilla – Attachment 140763 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]
[22.05] Bug 30975: Fix framework plugins on cloned fields/subfields
2205-Bug-30975-Fix-framework-plugins-on-cloned-fie.patch (text/plain), 1.49 KB, created by
Julian Maurice
on 2022-09-20 09:35:03 UTC
(
hide
)
Description:
[22.05] Bug 30975: Fix framework plugins on cloned fields/subfields
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2022-09-20 09:35:03 UTC
Size:
1.49 KB
patch
obsolete
>From 1809cf7061b139c724a551e08d67e8eefb2a3cfe 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] [22.05] 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 >--- > 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 16cf857..44f1bbf 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