From: Bill Erickson Date: Wed, 13 Dec 2017 21:28:23 +0000 (-0500) Subject: JBAS-1728 Re-focus SCKO barcode input after printing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=68874b21b770e10566c82d7788333454bf6d9f41;p=working%2FEvergreen.git JBAS-1728 Re-focus SCKO barcode input after printing Signed-off-by: Bill Erickson --- 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 81159d1bd3..360513e6bc 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -763,25 +763,36 @@ SelfCheckManager.prototype.printList = function(which) { // reset timeout selfckResetTimer(); + function afterPrint() { + // Called after the print window is closed. + // Re-focus input box after all print actions. + setTimeout(function(){selfckScanBox.focus()}, 100); + } + switch(which) { case 'checkout': - this.printSessionReceipt(); + this.printSessionReceipt(afterPrint); break; case 'items_out': - this.printItemsOutReceipt(); + this.printItemsOutReceipt(afterPrint); break; case 'holds': - this.printHoldsReceipt(); + this.printHoldsReceipt(afterPrint); break; case 'ready': readyHolds = true; - this.printHoldsReceipt(); + this.printHoldsReceipt(afterPrint); readyHolds = false; break; case 'fines': - this.printFinesReceipt(); + this.printFinesReceipt(afterPrint); break; } + + // afterPrint() is only called as a callback when there is stuff to + // print. Call it here too to ensure it's invokded one way or the + // other. + afterPrint(); } SelfCheckManager.prototype.updateHoldsSummary = function() {