From: Jason Etheridge Date: Mon, 16 May 2011 16:12:40 +0000 (-0400) Subject: persist partial changes to new copies in vol/copy editor has new copies are gathered. X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=448bfcc0a98976da0c64c794b1c7ec48e24c63a2 persist partial changes to new copies in vol/copy editor has new copies are gathered. In other words, you can do something like enter 5 in the "# of Copies" field, enter the first barcode (say b1), edit an attribute (say, set Circulate = No), and then enter a second barcode (b2). Previously, the changes made to b1 would be lost as b2 was entered (or as other movement around the barcode entry textboxes happened) and both copies would get a Circulate = Yes, but now in this scenario, you would see 1 copy set to No and 1 copy set to Yes for the Circulate attribute. Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index 9656044..1aea205 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -875,6 +875,9 @@ g.gather_copies = function() { for (var i = 0; i < barcodes.length; i++) { var acp_id = barcodes[i].getAttribute('acp_id') || g.new_acp_id--; + if (acp_id < 0) { + barcodes[i].setAttribute('acp_id',acp_id); + } var ou_id = barcodes[i].getAttribute('ou_id'); var callnumber_composite_key = barcodes[i].getAttribute('callkey'); var barcode = barcodes[i].value;