From: phasefx Date: Mon, 24 Jul 2006 08:36:12 +0000 (+0000) Subject: go to patron scan on Done. And bug fix: list was clearing before print was happening X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=378b7180e0aa5af8075ccdeb6bed3fafda46591b;p=Evergreen.git go to patron scan on Done. And bug fix: list was clearing before print was happening git-svn-id: svn://svn.open-ils.org/ILS/trunk@5097 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index b9de1e2aab..5016c1d8e5 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -165,8 +165,15 @@ circ.checkout.prototype = { ['command'], function() { try { - if (document.getElementById('checkout_auto').checked) obj.print(true); - obj.list.clear(); + if (document.getElementById('checkout_auto').checked) { + obj.print(true,function() { + obj.list.clear(); + xulG.set_tab(urls.XUL_PATRON_BARCODE_ENTRY,{},{}); + }); + } else { + obj.list.clear(); + xulG.set_tab(urls.XUL_PATRON_BARCODE_ENTRY,{},{}); + } } catch(E) { obj.error.standard_unexpected_error_alert('cmd_checkout_done',E); } @@ -180,7 +187,7 @@ circ.checkout.prototype = { }, - 'print' : function(silent) { + 'print' : function(silent,f) { var obj = this; try { obj.list.on_all_fleshed = function() { @@ -198,7 +205,7 @@ circ.checkout.prototype = { if (silent) params.no_prompt = true; JSAN.use('util.print'); var print = new util.print(); print.tree_list( params ); - setTimeout(function(){obj.list.on_all_fleshed = null;},0); + setTimeout(function(){obj.list.on_all_fleshed = null;if (typeof f == 'function') f();},0); } catch(E) { obj.error.standard_unexpected_error_alert('print',E); } diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 6ae45484f7..3e2d18b89f 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -32,6 +32,7 @@ patron.display.prototype = { urls.XUL_CHECKOUT, {}, { + 'set_tab' : xulG.set_tab, 'patron_id' : obj.patron.id(), 'on_list_change' : function(checkout) {