From b7fb6afd3d1027ff22d50b2b75f8b1344ceb1d2e Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 15 Jul 2005 20:57:04 +0000 Subject: [PATCH] focus and selection for scanbox git-svn-id: svn://svn.open-ils.org/ILS/trunk@1222 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/patron/patron_display.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js index 44835d5498..b983932d0c 100755 --- a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js @@ -201,6 +201,8 @@ function patron_display_patron_items_init(p) { function patron_display_patron_checkout_items_init(p) { p.patron_checkout_items = patron_checkout_items_init( { 'w' : p.w, 'node' : p.patron_checkout_items_node, 'popupset_node' : p.popupset_node, 'debug' : p.app } ); + var tb = p.patron_checkout_items_node.getElementsByAttribute('id','patron_checkout_barcode_entry_textbox')[0]; + var submit_button = p.patron_checkout_items_node.getElementsByAttribute('id','patron_checkout_submit_barcode_button')[0]; var checkouts = []; @@ -213,17 +215,18 @@ function patron_display_patron_checkout_items_init(p) { if (check) { checkouts.push( check ); p.patron_checkout_items.add_patron_checkout_items( [ checkouts.length - 1 ] ); + tb.value = ''; } } else { throw(permit_check.text); } } catch(E) { + tb.select(); handle_error(E); } + tb.focus(); } - var tb = p.patron_checkout_items_node.getElementsByAttribute('id','patron_checkout_barcode_entry_textbox')[0]; - var submit_button = p.patron_checkout_items_node.getElementsByAttribute('id','patron_checkout_submit_barcode_button')[0]; tb.addEventListener( 'keypress', function(ev) { -- 2.43.2