From: phasefx Date: Tue, 30 Nov 2010 19:51:27 +0000 (+0000) Subject: have the patron display default to the bills interface if spawned from the red-text... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6b8010b4f4fe16740bbf5db363b4ae809aac3ce4;p=evergreen%2Ftadl.git have the patron display default to the bills interface if spawned from the red-text label in the Check In UI git-svn-id: svn://svn.open-ils.org/ILS/trunk@18880 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index bac58aef90..7986545e87 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -419,7 +419,7 @@ circ.checkin.prototype = { m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.billable.amount', [row.my.acp.barcode(), util.money.sanitize(bill.balance_owed())]) + ' ' ); no_change_label.setAttribute('hidden','false'); - no_change_label.setAttribute('onclick','xulG.new_patron_tab({},{"id" : '+bill.usr()+' })'); + no_change_label.setAttribute('onclick','xulG.new_patron_tab({},{"id" : '+bill.usr()+', "show" : "bills" })'); } if (document.getElementById('fine_tally')) { var amount = Number( document.getElementById('fine_tally').getAttribute('amount') ) + Number( bill.balance_owed() ); diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 01804d7fa0..0264ddb863 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -620,7 +620,7 @@ patron.display.prototype = { 'barcode' : obj.barcode, 'id' : obj.id, 'refresh' : function() { obj.refresh_all(); }, - 'on_finished' : obj.gen_patron_summary_finish_func(), + 'on_finished' : obj.gen_patron_summary_finish_func(params), 'stop_sign_page' : obj.gen_patron_stop_sign_page_func(), 'spawn_group_interface' : function() { obj.spawn_group_interface(); }, 'new_patron_tab' : function(a,b) { return xulG.new_patron_tab(a,b); }, @@ -643,6 +643,7 @@ patron.display.prototype = { ); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); obj.summary_window = get_contentWindow(frame); + } else { obj.render_search_form(params); } @@ -843,7 +844,7 @@ patron.display.prototype = { } }, - 'gen_patron_summary_finish_func' : function() { + 'gen_patron_summary_finish_func' : function(display_params) { var obj = this; return function(patron,params) { @@ -869,9 +870,20 @@ patron.display.prototype = { } } - if (!obj._checkout_spawned) { - obj.spawn_checkout_interface(); - obj._checkout_spawned = true; + if (display_params['show']) { + setTimeout( + function() { + switch(display_params['show']) { + case 'bills' : util.widgets.dispatch('command','cmd_patron_bills'); break; + } + }, + 0 + ); + } else { + if (!obj._checkout_spawned) { + obj.spawn_checkout_interface(); + obj._checkout_spawned = true; + } } if (obj.stop_checkouts && obj.checkout_window) { diff --git a/Open-ILS/xul/staff_client/server/patron/display.xul b/Open-ILS/xul/staff_client/server/patron/display.xul index 5206ea1100..60230451bd 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.xul +++ b/Open-ILS/xul/staff_client/server/patron/display.xul @@ -50,7 +50,8 @@ 'barcode' : xul_param('barcode'), 'id' : xul_param('id'), 'query' : xul_param('query'), - 'doit' : xul_param('doit') + 'doit' : xul_param('doit'), + 'show' : xul_param('show') } ); //document.documentElement.style.setProperty('font-size-adjust','1','important'); diff --git a/Open-ILS/xul/staff_client/server/patron/display_horiz.xul b/Open-ILS/xul/staff_client/server/patron/display_horiz.xul index 4170d5f0f4..bf8f3b04fe 100644 --- a/Open-ILS/xul/staff_client/server/patron/display_horiz.xul +++ b/Open-ILS/xul/staff_client/server/patron/display_horiz.xul @@ -50,7 +50,8 @@ 'barcode' : xul_param('barcode'), 'id' : xul_param('id'), 'query' : xul_param('query'), - 'doit' : xul_param('doit') + 'doit' : xul_param('doit'), + 'show' : xul_param('show') } ); //document.documentElement.style.setProperty('font-size-adjust','1','important');