From: Bill Erickson Date: Wed, 21 Oct 2015 16:42:54 +0000 (-0400) Subject: JBAS-821 SCKO post-barcode timer; cleanup X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bb0babc28a928101fc49b80950b5f18cd25736e2;p=working%2FEvergreen.git JBAS-821 SCKO post-barcode timer; cleanup Reinstate the timeout that occurs between entering a barcode and failing to enter a password. Remove some trailing references to the defunct keepMeLoggedIn function. Signed-off-by: Bill Erickson --- diff --git a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 index aaf26073cc..60e31c2a05 100644 --- a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 +++ b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 @@ -133,7 +133,7 @@ function switchTo(str,subpage) { - + @@ -214,7 +214,7 @@ function switchTo(str,subpage) {
logout without receipt
- back to checkout Back to Checkout + back to checkout Back to Checkout
diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/payment.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/payment.js index 1c58d63e08..5c05a22c62 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/payment.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/payment.js @@ -82,7 +82,7 @@ proto.drawPayFinesPage = function(patron, total, xacts, onPaymentSubmit) { // TODO add per-transaction blocks for orgs that do not support CC payments proto.sendCCPayment = function(patron, xacts, onPaymentSubmit) { - this.keepMeLoggedIn(); + selfckResetTimer(); var args = { userid : patron.id(), payment_type : 'credit_card_payment', 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 307f5f1576..f27b1d4268 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -43,10 +43,14 @@ const SET_BLOCK_CHECKOUT_ON_COPY_STATUS = 'circ.selfcheck.block_checkout_on_copy openils.User.default_login_agent = 'selfcheck'; // start the logout timer -function selfckStartTimer() { +function selfckStartTimer(noWarning) { timerId = setTimeout( function() { - selfckLogoutWarning(); + if (noWarning) { + SelfCheckManager.prototype.logoutPatron(); + } else { + selfckLogoutWarning(); + } }, patronTimeout ); @@ -56,11 +60,12 @@ function selfckStartTimer() { function selfckResetTimer() { console.log('clearing login timer'); clearTimeout(timerId); - - if (selfCheckManager && selfCheckManager.patron) { - console.log('Starting new login timer'); - selfckStartTimer(); - } + if (!selfCheckManager) return; + console.log('Starting new login timer'); + + // do not show a warning dialog if the inactivity timeout + // occurs between entering a barcode and password. + selfckStartTimer(!Boolean(selfCheckManager.patron)); } function selfckLogoutWarning() { @@ -356,8 +361,9 @@ SelfCheckManager.prototype.drawLoginPage = function() { var bcHandler = function(barcode) { // handle patron barcode entry + if(self.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { - + // password is required. wire up the scan box to read it self.updateScanBox({ msg : 'Please enter your password', // TODO i18n @@ -990,7 +996,9 @@ SelfCheckManager.prototype.checkout = function(barcode, override) { this.prevCirc = null; if(!barcode) { - this.updateScanbox(null, true); + // commenting this line out becuase it's misspelled and + // not doing anything but throwing an error. + //this.updateScanbox(null, true); return; }
TITLE:
TITLE:
DUE DATE:
DATE RETURN:
BALANCE OWED:$