From b0606846d5a2ff6814bdae3861226ef88df9a360 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 18 Sep 2017 09:39:47 -0700 Subject: [PATCH] JBAS-1728 SCKO Login return button clears BC entry window.reload() appears to leave the value in the barcode entry box after the user clicks Return To Login. It also takes a long time, since it's reloading. Teach the link to use the same href setting code that the auto-return-to-login-page code uses. It clears the barcode box and runs much faster. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 af4551b2b7..76581c71ac 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -200,7 +200,6 @@ SelfCheckManager.prototype.init = function() { self.drawFinesPage(); openils.Util.show('oils-selfck-fines-tbody'); }, - 'oils-selfck-nav-return-login' : function() { window.location.reload() }, 'oils-selfck-nav-logout' : function() { self.logoutPatron(); }, 'oils-selfck-nav-logout-print' : function() { self.logoutPatron(true); }, 'oils-selfck-nav-logout-email' : function() { self.logoutPatron(false, true); }, @@ -1752,7 +1751,13 @@ SelfCheckManager.prototype.processLogout = function() { // dict of org unit settings for "here" this.orgSettings = {}; - setTimeout(function() {location.href = return_url;}, thankYouPageTimeout); + var goHomeFunc = function() {location.href = return_url}; + + // "return to login" link + dojo.connect(dojo.byId('oils-selfck-nav-return-login'), 'onclick', goHomeFunc); + + // automatically redirect if return link is not clicked + setTimeout(goHomeFunc, thankYouPageTimeout); } //TODO: Remove -- 2.11.0