fix regression with activating checkout pane
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Oct 2009 05:09:45 +0000 (05:09 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Oct 2009 05:09:45 +0000 (05:09 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14288 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 0d16d91..975d5b7 100644 (file)
@@ -181,7 +181,7 @@ patron.display.prototype = {
                                                ['command'],
                         function(ev) {
                                    obj.reset_nav_styling('cmd_patron_checkout');
-                            spawn_checkout_interface();
+                            obj.spawn_checkout_interface();
                         }
                                        ],
                                        'cmd_patron_items' : [
@@ -695,10 +695,9 @@ patron.display.prototype = {
                try { obj.refresh_deck(); } catch(E) { obj.error.sdump('D_ERROR', E + '\n'); }
        },
 
-    'gen_patron_summary_finish_func' : function() {
+    'spawn_checkout_interface' : function() {
         var obj = this;
-
-        function spawn_checkout_interface() {
+        try {
             try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_checkout" ) ); } catch(E) {};
             obj.reset_nav_styling('cmd_patron_checkout',true);
             var frame = obj.right_deck.set_iframe(
@@ -739,7 +738,13 @@ patron.display.prototype = {
             );
             netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
             obj.checkout_window = get_contentWindow(frame);
+        } catch(E) {
+            alert('Error in spawn_checkout_interface(): ' + E);
         }
+    },
+
+    'gen_patron_summary_finish_func' : function() {
+        var obj = this;
 
         return function(patron,params) {
             try {
@@ -765,7 +770,7 @@ patron.display.prototype = {
                 }
 
                 if (!obj._checkout_spawned) {
-                    spawn_checkout_interface();
+                    obj.spawn_checkout_interface();
                     obj._checkout_spawned = true;
                 }