Bugzilla – Attachment 192997 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
0001-Bug-41829-Set-correct-id-to-copied-Tag-editor-button.patch (text/plain), 2.33 KB, created by
Emmi Takkinen
on 2026-02-12 07:44:59 UTC
(
hide
)
Description:
Bug 41829: Set correct id to copied Tag editor button
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2026-02-12 07:44:59 UTC
Size:
2.33 KB
patch
obsolete
>From b04173f3085cae7d11f073441563ca7f7681a4e2 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 >--- > 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 f35750951a..42a8a0e1ec 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.34.1 >
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