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
);
<command id="cmd_reload" />
<command id="cmd_bills" />
+ <command id="cmd_bill_history" />
<command id="cmd_checkout" />
<command id="cmd_edit" />
<command id="cmd_events" />
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':
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));
[
"bills",
+ "bill_history",
"checkout",
"edit",
"events",
}, 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;
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;
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;