have the patron display default to the bills interface if spawned from the red-text...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Nov 2010 19:51:27 +0000 (19:51 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Nov 2010 19:51:27 +0000 (19:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18880 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index bac58ae..7986545 100644 (file)
@@ -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() );
index 01804d7..0264ddb 100644 (file)
@@ -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) {
index 5206ea1..6023045 100644 (file)
@@ -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');
index 4170d5f..bf8f3b0 100644 (file)
@@ -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');