Bugzilla – Attachment 193865 Details for
Bug 41829
Tag editor button has wrong id on copied MARC field when value builder plugin is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41829: Set correct id to copied Tag editor button
Bug-41829-Set-correct-id-to-copied-Tag-editor-butt.patch (text/plain), 2.40 KB, created by
Owen Leonard
on 2026-02-25 15:28:12 UTC
(
hide
)
Description:
Bug 41829: Set correct id to copied Tag editor button
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-02-25 15:28:12 UTC
Size:
2.40 KB
patch
obsolete
>From 0a5c7fbfcb25bbe69091ef69d7584b4b33031806 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Thu, 12 Feb 2026 09:37:15 +0200 >Subject: [PATCH] Bug 41829: Set correct id to copied Tag editor button > >When one copies MARC field, Tag editor button on fields >containing value builder plugin have same id as original >MARC field. This patch sets correct id to these buttons. > >To reproduce: >1. Find MARC framework which has value builder plugin > attached to one of its fields. >2. Navigate to Cataloging -> New record. >3. Navigate to MARC field with plugin attached to it. >4. Inspect fields Tag editor button with browsers developer > tools. > -> Check the id of Tag editor button. >5. Copy the field and check id of copied Tag editor button. > -> Notice that it has the same id as in original field. >6. Apply this patch. >7. Referesh the page, navigate back to field and copy it. >8. Inspect Tag editors id. > -> Id should now be same as in other copied fields. > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >index f35750951a1..42a8a0e1ec8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >@@ -330,7 +330,7 @@ function CloneField(index, hideMarc, advancedMARCEditor) { > // do nothing if label does not exist. > } > >- // setting its '+' and '-' buttons >+ // setting its '+', '-' and 'buttonDot' buttons > try { > var anchors = divs[i].getElementsByTagName("a"); > for (var j = 0; j < anchors.length; j++) { >@@ -352,6 +352,13 @@ function CloneField(index, hideMarc, advancedMARCEditor) { > divs[i].getAttribute("id") + > "'); return false;" > ); >+ } else if ( >+ anchors[j].getAttribute("id").match(/^buttonDot/) >+ ) { >+ anchors[j].setAttribute( >+ "id", >+ anchors[j].getAttribute("id") + new_key >+ ); > } > } > } catch (e) { >-- >2.39.5
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 41829
:
192997
| 193865