Bugzilla – Attachment 58867 Details for
Bug 17725
Repeating a field or subfield clones content
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17725: Do not copy subfield's content when cloning
Bug-17725-Do-not-copy-subfields-content-when-cloni.patch (text/plain), 2.07 KB, created by
Jonathan Druart
on 2017-01-12 11:19:12 UTC
(
hide
)
Description:
Bug 17725: Do not copy subfield's content when cloning
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-01-12 11:19:12 UTC
Size:
2.07 KB
patch
obsolete
>From 0c76b1c2889ca77c69b29945f817e1ed93a6615b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Jan 2017 13:39:47 +0100 >Subject: [PATCH] Bug 17725: Do not copy subfield's content when cloning > >To replicate: >- Open an existing record in your catalog >- Create another field or subfield of a field/subfield already used using the icon to repeat it >- Verify that the content is copied over >- Verify this happens for input (one line) and textare (multiple lines) > >I can't make this happen for when creating a new record, but more consistently on editing existing records. > >This is rather annoying when cataloguing in Koha, as the cataloguer has to empty the field first and that adds an extra step for each repeated field. > >Test plan: >Confirm than the content is not copied when you clone a field or a subfield. >--- > koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >index ed43aec..44cd949 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >@@ -291,6 +291,9 @@ function CloneSubfield(index, advancedMARCEditor){ > id_input = inputs[i].getAttribute('id')+new_key; > inputs[i].setAttribute('id',id_input); > inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key); >+ if(inputs[i].getAttribute("id") && inputs[i].getAttribute("id").match(/^tag_/) ){ >+ inputs[i].value = ""; >+ } > linkid = id_input; > } > >@@ -312,6 +315,9 @@ function CloneSubfield(index, advancedMARCEditor){ > id_input = textareas[i].getAttribute('id')+new_key; > textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key); > textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key); >+ if(textareas[i].getAttribute("id") && textareas[i].getAttribute("id").match(/^tag_/) ){ >+ textareas[i].value = ""; >+ } > linkid = id_input; > } > >-- >2.1.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 17725
:
58867
|
58914
|
58915
|
58916
|
58944
|
58945