go to patron scan on Done. And bug fix: list was clearing before print was happening
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Jul 2006 08:36:12 +0000 (08:36 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Jul 2006 08:36:12 +0000 (08:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5097 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/patron/display.js

index b9de1e2..5016c1d 100644 (file)
@@ -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);
                                }
index 6ae4548..3e2d18b 100644 (file)
@@ -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) {