Using a custom event handled by a chrome event handler rather
than calling xulG.set_tab() directly avoids any possibility of
leaking objects and executation contexts from the code that's
requesting refresh of the checkout page.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
obj.sort_menu(document.getElementById('main.menu.admin'), true);
+ document.addEventListener(
+ 'refresh_checkout',
+ function() {
+ try {
+ obj.set_tab(obj.url_prefix('XUL_PATRON_BARCODE_ENTRY'),{},{});
+ } catch(E) {
+ obj.error.sdump('D_ERROR','tab_refresh_checkout_handler: ' + js2JSON(E));
+ }
+ }
+ ,
+ false,
+ true
+ );
+
if(params['firstURL']) {
obj.new_tab(params['firstURL'],{'focus':true},null);
}