From: phasefx Date: Thu, 9 Sep 2010 22:15:53 +0000 (+0000) Subject: better synchronization between holds interface and hold details interface, and provid... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=79548cc12132774d07d2f96ecf38f381554cc50b;p=evergreen%2Fmasslnc.git better synchronization between holds interface and hold details interface, and provide more data to list columns in hold details git-svn-id: svn://svn.open-ils.org/ILS/trunk@17560 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/hold_details.js b/Open-ILS/xul/staff_client/server/patron/hold_details.js index 083173674c..4a7b939c70 100644 --- a/Open-ILS/xul/staff_client/server/patron/hold_details.js +++ b/Open-ILS/xul/staff_client/server/patron/hold_details.js @@ -26,7 +26,7 @@ function my_init() { } } -function fetch_and_render_all() { +function fetch_and_render_all(do_not_refresh_parent_interface) { try { if (!xulG.ahr_id) { alert('boo'); return; } @@ -56,6 +56,12 @@ function fetch_and_render_all() { retrieve_notifications(); render_notifications(); + if (!do_not_refresh_parent_interface) { + if (typeof xulG.clear_and_retrieve == 'function') { + xulG.clear_and_retrieve(); + } + } + } catch(E) { alert('Error in hold_details.js, fetch_and_render_all(): ' + E); } @@ -64,14 +70,15 @@ function fetch_and_render_all() { function fetch_hold(id) { try { g.ahr_id = xulG.ahr_id; - g.blob = xulG.blob; - if (g.blob) { - g.ahr = xulG.blob.hold; + if (xulG.blob) { + g.blob = xulG.blob; + delete xulG.blob; // one-time deal for speed } else { g.blob = g.network.simple_request('FM_AHR_BLOB_RETRIEVE',[ ses(), g.ahr_id ]); if (typeof g.ahr.ilsevent != 'undefined') { throw(g.ahr); } - g.ahr = g.blob.hold; } + g.ahr = g.blob.hold; + g.ahr.status( g.blob.status ); } catch(E) { alert('Error in hold_details.js, fetch_hold(): ' + E); } @@ -123,9 +130,18 @@ function a_list_of_one() { 'row' : { 'my' : { 'ahr' : g.ahr, + 'status' : g.blob.status, 'acp' : g.blob.copy, 'acn' : g.blob.volume, 'mvr' : g.blob.mvr, + 'patron_family_name' : g.blob.patron_last, + 'patron_first_given_name' : g.blob.patron_first, + 'patron_barcode' : g.blob.patron_barcode, + 'total_holds' : g.blob.total_holds, + 'queue_position' : g.blob.queue_position, + 'potential_copies' : g.blob.potential_copies, + 'estimated_wait' : g.blob.estimated_wait, + 'ahrn_count' : g.blob.hold.notes().length, 'blob' : g.blob } }, diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index a0969e3dab..83b9ae6d9f 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -232,7 +232,8 @@ patron.holds.prototype = { xulG.patron_rendered_elsewhere = (obj.hold_interface_type == 'patron'); xulG.bib_rendered_elsewhere = (obj.hold_interface_type == 'record'); f.xulG = xulG; - f.fetch_and_render_all(); + f.xulG.clear_and_retrieve = function() { obj.clear_and_retrieve(); }; + f.fetch_and_render_all(true); } } catch(E) { alert('Error in holds.js, cmd_alt_view handler: ' + E);