From e15a12bd70e5851e251a91a0f5582da45f862101 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 7 Oct 2009 05:09:45 +0000 Subject: [PATCH] fix regression with activating checkout pane 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 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 0d16d91b1d..975d5b7ba9 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -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; } -- 2.11.0