From 7c0e2485b748d2afcaabcbb2be805a0a83930575 Mon Sep 17 00:00:00 2001 From: pines Date: Fri, 25 Aug 2006 23:39:42 +0000 Subject: [PATCH] default focus when navigating tabs git-svn-id: svn://svn.open-ils.org/ILS/trunk@5698 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/z3950.js | 1 + Open-ILS/xul/staff_client/server/cat/z3950.xul | 4 ++++ Open-ILS/xul/staff_client/server/circ/checkin.xul | 1 + Open-ILS/xul/staff_client/server/circ/copy_status.xul | 1 + Open-ILS/xul/staff_client/server/circ/in_house_use.xul | 1 + Open-ILS/xul/staff_client/server/patron/barcode_entry.xul | 1 + 6 files changed, 9 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index 6ee4ad31ef..0dc3a72399 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -208,6 +208,7 @@ cat.z3950.prototype = { document.getElementById('password').setAttribute('value', obj.creds.services[service].password ); + try { g.service = service; } catch(E) {} obj.focus(service); } else { document.getElementById('username').focus(); diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.xul b/Open-ILS/xul/staff_client/server/cat/z3950.xul index 4bf5a7511b..d2cd0a0583 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.xul +++ b/Open-ILS/xul/staff_client/server/cat/z3950.xul @@ -70,6 +70,10 @@ g.z3950.handle_enter(ev); } + function default_focus() { + setTimeout( function() { try { document.getElementById("username").focus(); g.z3950.focus(g.service); } catch(E) { alert(E); } }, 0 ); + } + ]]> diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.xul b/Open-ILS/xul/staff_client/server/circ/checkin.xul index 41fdf79350..3158c5d8ad 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.xul +++ b/Open-ILS/xul/staff_client/server/circ/checkin.xul @@ -71,6 +71,7 @@ } } + function default_focus() { try { setTimeout( function() { document.getElementById('checkin_barcode_entry_textbox').focus(); }, 0); } catch(E) {} } ]]> diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.xul b/Open-ILS/xul/staff_client/server/circ/copy_status.xul index 1e19be3bab..6958588d2c 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.xul @@ -78,6 +78,7 @@ } } + function default_focus() { try { setTimeout( function() { document.getElementById('copy_status_barcode_entry_textbox').focus(); }, 0); } catch(E) {} } ]]> diff --git a/Open-ILS/xul/staff_client/server/circ/in_house_use.xul b/Open-ILS/xul/staff_client/server/circ/in_house_use.xul index 679a381520..b86fabe7f2 100644 --- a/Open-ILS/xul/staff_client/server/circ/in_house_use.xul +++ b/Open-ILS/xul/staff_client/server/circ/in_house_use.xul @@ -61,6 +61,7 @@ } } + function default_focus() { try { setTimeout( function() { document.getElementById('in_house_use_barcode_entry_textbox').focus(); }, 0); } catch(E) {} } ]]> diff --git a/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul b/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul index d56704031a..2ff28f408f 100644 --- a/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul +++ b/Open-ILS/xul/staff_client/server/patron/barcode_entry.xul @@ -111,6 +111,7 @@ } } + function default_focus() { try { setTimeout( function() { document.getElementById('barcode_tb').focus(); }, 0); } catch(E) {} } ]]> -- 2.11.0