Bugzilla – Attachment 58915 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]
[SIGNED-OFF] Bug 17725: Do not copy subfield's content when cloning
SIGNED-OFF-Bug-17725-Do-not-copy-subfields-content.patch (text/plain), 2.14 KB, created by
Josef Moravec
on 2017-01-13 08:04:13 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17725: Do not copy subfield's content when cloning
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-01-13 08:04:13 UTC
Size:
2.14 KB
patch
obsolete
>From bd7e579a8c82f64d717a031665941b82e6c81ac6 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] [SIGNED-OFF] 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. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > 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