From eec29105f500e38ce7173d7fbef0c9a9bfddff08 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 7 Dec 2005 22:06:25 +0000 Subject: [PATCH] now alerting when the user hits 'cancel' to the expire warning and the session has already expired git-svn-id: svn://svn.open-ils.org/ILS/trunk@2274 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/config.js | 2 +- Open-ILS/web/opac/common/js/opac_utils.js | 10 +++++++--- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/opac/common/js/config.js b/Open-ILS/web/opac/common/js/config.js index 133c5e114d..e3ee5cbada 100644 --- a/Open-ILS/web/opac/common/js/config.js +++ b/Open-ILS/web/opac/common/js/config.js @@ -59,7 +59,7 @@ var STYPE_SUBJECT = "subject"; var STYPE_SERIES = "series"; var STYPE_KEYWORD = "keyword"; -var LOGOUT_WARNING_TIME = 15; +var LOGOUT_WARNING_TIME = 20; /* "head up" for session timeout */ /* container for global variables shared accross pages */ diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js index 8617f25acf..3c929ec9f5 100644 --- a/Open-ILS/web/opac/common/js/opac_utils.js +++ b/Open-ILS/web/opac/common/js/opac_utils.js @@ -275,8 +275,8 @@ function grabUser(ses, force) { if(G.user.prefs['opac.hits_per_page']) COUNT = parseInt(G.user.prefs['opac.hits_per_page']); - //new AuthTimer(getAuthtime()).run(); - new AuthTimer(20).run(); + new AuthTimer(getAuthtime()).run(); + //new AuthTimer(20).run(); return G.user; @@ -635,7 +635,11 @@ AuthTimer.prototype.run = function() { function _authTimerAlert() { if( confirm( $('auth_session_expiring').innerHTML ) ) doLogout(); - else grabUser(null, true); + else { + if(!grabUser(null, true)) { + alert($('auth_session_expired').innerHTML); + } + } } diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index ef28aa9495..793e0b3fe0 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -50,7 +50,7 @@ - + -- 2.43.2