From: Jason Etheridge Date: Wed, 27 Mar 2013 18:37:01 +0000 (-0400) Subject: This fixes the invocation of Bill History X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=967546deb75c7932e84dc28ff59cf4ee1eb3d906;p=working%2FEvergreen.git This fixes the invocation of Bill History when used with this new patron display/summary Signed-off-by: Jason Etheridge Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index ba476ee524..27e78ed0e0 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -189,16 +189,24 @@ function event_listeners() { window.bill_event_listeners.add($('bill_history_btn'), 'command', function() { - xulG.display_window.g.patron.right_deck.reset_iframe( - urls.XUL_PATRON_BILL_HISTORY, - {}, - { + if (xulG.alt_bill_history) { + xulG.alt_bill_history(); + } else { + var content_params = { 'patron_id' : g.patron_id, 'refresh' : function() { refresh(); }, 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix - } - ); + }; + var func = xulG.display_window + ? xulG.display_window.g.patron.right_deck.reset_iframe + : xulG.set_tab; + func( + urls.XUL_PATRON_BILL_HISTORY, + {}, + content_params + ); + } }, false ); diff --git a/Open-ILS/xul/staff_client/server/patron/display.xul b/Open-ILS/xul/staff_client/server/patron/display.xul index 95d5e5b66a..400085730b 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.xul +++ b/Open-ILS/xul/staff_client/server/patron/display.xul @@ -34,6 +34,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/patron.js b/Open-ILS/xul/staff_client/server/patron/patron.js index c273cc8f85..98b028e17e 100644 --- a/Open-ILS/xul/staff_client/server/patron/patron.js +++ b/Open-ILS/xul/staff_client/server/patron/patron.js @@ -117,7 +117,7 @@ function get_tab_name(p_interface) { case 'group': tab_name = 'Group Patron#' + patron_id; break; - case 'bills': + case 'bills': case 'bill_history': tab_name = 'Bills Patron#' + patron_id; break; case 'edit': @@ -151,7 +151,9 @@ function get_tab_name(p_interface) { function patron_tab(p_interface,replace_tab) { try { if (replace_tab == 'merely_reset') { - $(main_interface).disabled = false; + if ($(main_interface)) { + $(main_interface).disabled = false; + } main_interface = p_interface; try { xulG.set_tab_name(get_tab_name(main_interface)); @@ -458,6 +460,7 @@ function patron_ui_setup() { [ "bills", + "bill_history", "checkout", "edit", "events", @@ -505,7 +508,9 @@ function patron_ui_populate() { }, 0 ); - $(main_interface).disabled = true; + if ($(main_interface)) { + $(main_interface).disabled = true; + } var barcode_for_some_interfaces = xul_param('barcode'); var patron_object_for_some_interfaces; @@ -549,6 +554,9 @@ function patron_ui_populate() { case 'bills': src = urls.XUL_PATRON_BILLS; break; + case 'bill_history': + src = urls.XUL_PATRON_BILL_HISTORY; + break; case 'edit': src = urls.XUL_REMOTE_BROWSER; /* XUL_PATRON_EDIT */ break; @@ -618,6 +626,11 @@ function patron_ui_populate() { cw.xulG.on_money_change = function(b) { reset_summary(); } + cw.xulG.alt_bill_history = function() { + patron_tab('bill_history','merely_reset'); + } + break; + case 'bill_history': break; case 'edit': cw.xulG.url = urls.XUL_PATRON_EDIT;