From 359b0adb618e4b52813a803f7682ca61340f619b Mon Sep 17 00:00:00 2001 From: khuckins Date: Wed, 18 Nov 2015 14:06:32 -0500 Subject: [PATCH] KMAIN-1921 Item Status Reset Move Clearing function call to a check for the listbox, so box clears regardless of if holds and transit status aren't valid. Add caption change so captions are valid when going from a non-captured/non-transit item to a captured/ in-transit item. Signed-off-by: khuckins modified: Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js modified: Open-ILS/xul/staff_client/server/locale/en-US/circ.properties Patch modified by Bill to reset hold patron name display and to remove changes unrelated to this patch. Signed-off-by: Bill Erickson --- .../staff_client/server/circ/alternate_copy_summary.js | 15 ++++++++++++--- .../xul/staff_client/server/locale/en-US/circ.properties | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index e8eb102589..ef06cfae69 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -341,9 +341,11 @@ function load_item() { set("target_copy", ''); set("hold_transit_copy", ''); + // KMAIN-1921 Clear the list even if item isn't applicable - avoid ghost data + transit_list.clear(); + if (details.transit) { - transit_list.clear(); transit_list.append( { 'row' : { 'my' : { 'atc' : details.transit, } } }); //Set transit caption back to default of "In Transit" @@ -367,6 +369,8 @@ function load_item() { set("source_send_time", util.date.formatted_date( details.transit.source_send_time(), '%{localized}' )); set("target_copy", details.transit.target_copy()); set("hold_transit_copy", details.transit.hold_transit_copy()); + $('transit_caption').setAttribute('label', // KMAIN-1921 + $('circStrings').getString('staff.circ.in_transit_caption')); } else { transit_list.clear(); $('transit_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.not_transit')); @@ -633,7 +637,6 @@ function load_item() { set_tooltip("selection_ou", ''); set("target", ''); set("hold_usr", ''); - set("hold_patron_name", ''); set("cancel_time", ''); set("notify_time", ''); set("notify_count", ''); @@ -647,12 +650,16 @@ function load_item() { set("cancel_note", ''); set("notes", ''); + + // KMAIN-1921 Clear the list even if the item isn't applicable - avoid ghost data + $('hold_patron_name').setAttribute('value', ''); + hold_list.clear(); + if (details.hold) { var better_fleshed_hold_blob = network.simple_request('FM_AHR_BLOB_RETRIEVE.authoritative',[ ses(), details.hold.id() ]); var status_robj = better_fleshed_hold_blob.status; JSAN.use('circ.util'); - hold_list.clear(); hold_list.append( { 'row' : { 'my' : { 'ahr' : better_fleshed_hold_blob.hold, 'acp' : details.copy, 'status' : status_robj, } } }); //Set hold_caption back to default of "Captured for Hold" @@ -707,6 +714,8 @@ function load_item() { set("cancel_cause", details.hold.cancel_cause()); set("cancel_note", details.hold.cancel_note()); set("notes", details.hold.notes()); + $('hold_caption').setAttribute('label', // KMAIN-1921 + $('circStrings').getString('staff.circ.captured_hold_caption')); } else { // Clear the hold list and remove patron name from hold screen hold_list.clear(); diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 338dc6b08e..a975602942 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -83,6 +83,8 @@ staff.circ.copy_details.hold=Hold ID = %1$s staff.circ.copy_details.transit=Transit ID = %1$s staff.circ.copy_details.circ=Circulation ID = %1$s staff.circ.copy_details.last_circ=Last Circulation +staff.circ.in_transit_caption=In Transit +staff.circ.captured_hold_caption=Captured for Hold staff.circ.copy_details.current_circ=Current Circulation staff.circ.copy_details.no_circ=This item has yet to circulate. staff.circ.copy_details.not_transit=This item is not in transit. -- 2.11.0