From 434ead35b4fab44a6305ca9107c8a51befcb7fca Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Dec 2017 17:39:14 -0500 Subject: [PATCH] JBAS-1728 Focus input after dbl-click login button Signed-off-by: Bill Erickson --- KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 | 9 +++++++++ Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 index 9380c18b96..2668695e2d 100644 --- a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 +++ b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 @@ -47,6 +47,15 @@ function switchTo(str,subpage) { dojo.byId('selfckScanBox').focus(); dojo.byId('selfckScanBox').select(); + // Call these again after a brief timeout to handle things like + // unnecessary double-clicks on navigation links, where first + // click focuses, and second causes loss of focus. + setTimeout(function(){ + dojo.byId('selfckScanBox').focus(); + dojo.byId('selfckScanBox').select(); + }, 100); + + // NOTE: switchTo() is called in the midst of various actions, // so we can't clear the notifications here. // dojo.byId('oils-selfck-status-div').innerHTML = ''; diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js index 360513e6bc..0284952357 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -372,7 +372,7 @@ SelfCheckManager.prototype.loginPatron = function(barcode_or_usrname, passwd) { //if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { // password always reqired, per KCLS - fail safe if(!passwd) { // would only happen in dev/debug mode when using the patron= param - alert('password required by org setting. remove patron= from URL'); + //alert('password required by org setting. remove patron= from URL'); return; } -- 2.11.0