var patronTimeoutWarning = 20000;
var selfckWarningSetup = false;
var selfckWarningTimer;
+var selfCheckManager;
var selfCheckMgr;
// reset the logout timer
function selfckResetTimer() {
- console.log('resetting timer');
+ console.log('clearing login timer');
clearTimeout(timerId);
- selfckStartTimer();
+
+ if (selfCheckManager && selfCheckManager.patron) {
+ console.log('Starting new login timer');
+ selfckStartTimer();
+ }
}
function selfckLogoutWarning() {
*/
openils.Util.addOnLoad(
function() {
- new SelfCheckManager().init();
+ selfCheckManager = new SelfCheckManager();
+ selfCheckManager.init();
openils.Util.registerEnterHandler(dojo.byId('patron-login-username'), function(){checkLogin();});
openils.Util.registerEnterHandler(dojo.byId('patron-login-password'), function(){selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value);});
}