Bugzilla – Attachment 39275 Details for
Bug 14213
Cataloging plugin in cloned field does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14213: Cataloging plugin in cloned field does not work
Bug-14213-Cataloging-plugin-in-cloned-field-does-n.patch (text/plain), 2.70 KB, created by
Marcel de Rooy
on 2015-05-18 09:02:34 UTC
(
hide
)
Description:
Bug 14213: Cataloging plugin in cloned field does not work
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-05-18 09:02:34 UTC
Size:
2.70 KB
patch
obsolete
>From 272fedc2bce110d47a84ea133e9d5aba49d840d8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 18 May 2015 10:31:26 +0200 >Subject: [PATCH] Bug 14213: Cataloging plugin in cloned field does not work >Content-Type: text/plain; charset=utf-8 > >A code change for report 10480 in cataloging.js does not work well in case >you clone a field with a plugin on a subfield. >The events (click, focus, etc.) do not work on the subfield of the clone. > >This patch corrects the situation by finding the right html element for >adding event binding. >NOTE: The test plan uses EXAMPLE.pl since many old plugins do not operate >on the correct field value when cloning. This is corrected in bug 13437. > >Test plan: >[1] Attach EXAMPLE.pl to field 007, 246h and 260c. > In sql for 007: update marc_subfield_structure set > value_builder='EXAMPLE.pl' where tagfield='007' and tagsubfield='@'; >[2] Clone field 007. Verify that focus and click operate on both fields. > Check also that the plugin works on the value corresponding with > the button you clicked. >[3] Clone field 246. Do the same checks on both subfields $h. >[4] Clone subfield 260c. Do the same checks again. >--- > koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >index 9fa70a5..5712ab0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >@@ -131,7 +131,8 @@ function CloneField(index, hideMarc, advancedMARCEditor) { > } > } > if( $(inputs[1]).hasClass('framework_plugin') ) { >- var oldcontrol= original.getElementsByTagName('input')[1]; >+ var olddiv= original.getElementsByTagName('div')[i]; >+ var oldcontrol= olddiv.getElementsByTagName('input')[1]; > AddEventHandlers( oldcontrol,inputs[1],id_input ); > } > >@@ -177,7 +178,8 @@ function CloneField(index, hideMarc, advancedMARCEditor) { > // 2 possibilities : > try{ > if( $(buttonDot).hasClass('framework_plugin') ) { >- var oldcontrol= original.getElementsByTagName('a')[0]; >+ var olddiv= original.getElementsByTagName('div')[i]; >+ var oldcontrol= olddiv.getElementsByTagName('a')[0]; > AddEventHandlers(oldcontrol,buttonDot,id_input); > } else { > if(buttonDotOnClick.match('Dopop')) { // -2- It's a auth value >-- >1.7.10.4
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 14213
:
39275
|
39285
|
39291