Bugzilla – Attachment 15985 Details for
Bug 9759
last subfield can be deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9759: last subfield can be deleted
Bug-9759-last-subfield-can-be-deleted.patch (text/plain), 2.29 KB, created by
Kyle M Hall (khall)
on 2013-03-08 15:52:26 UTC
(
hide
)
Description:
Bug 9759: last subfield can be deleted
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-08 15:52:26 UTC
Size:
2.29 KB
patch
obsolete
>From 2fbd21383a0755e97d9ec2af84330e26552291de Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 7 Mar 2013 11:54:57 +0100 >Subject: [PATCH] Bug 9759: last subfield can be deleted > >In authorities and biblios editors, a repeatable subfield can be deleted (small icon next to input). >Clone subfields are really deleted but last existing subfield is just set empty instead of deleted. >But when same field is repeated, the last subfield can be deleted. > >This patch corrects this, last subfield of a field, even repeated, can not be deleted. > >Test plan : >- Edit a biblio >- Choose a repeatable field with a repeatable subfield : ie 600 and $x >- Edit 600, enter a text in $x : ie "subA" >- Clone $x >- Delete second $x >=> second $x is deleted >- Delete first $x >=> $x is not deleted but set empty >- Edit 600, enter a text in $x : ie "subA" >- Clone 600 >- Edit second 600, enter a text in $x : ie "subB" >- Clone $x of second 600 >- Delete second $x of second 600 >=> second $x of second 600 is deleted >- Delete first $x of second 600 >=> with this patch : first $x of second 600 is set empty >=> without this patch : first $x of second 600 is deleted, second 600 has no $x anymore >Perform same test plan on an authority. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js | 4 ++-- > 1 files changed, 2 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 e604bdc..614e698 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >@@ -342,8 +342,8 @@ function UnCloneField(index) { > } else { > // unclone a subfield, check if there will remain one subfield > var subfieldCode = getFieldAndSubfieldCode(index); >- // subfield divs with id begining with original field and subfield field code >- var cloneSubfields = $('.subfield_line[id^="subfield'+subfieldCode+'"]'); >+ // subfield divs of same field with id begining with original field and subfield field code >+ var cloneSubfields = $(original).parent().children('.subfield_line[id^="subfield'+subfieldCode+'"]'); > if (cloneSubfields.length > 1) { > canUnclone = true; > } >-- >1.7.2.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 9759
:
15927
|
15985
|
17028