pos-gis/public/assets/js/pages/features/miscellaneous/session-timeout.js
2024-10-07 13:13:42 +07:00

30 lines
864 B
JavaScript
Vendored

"use strict";
var KTSessionTimeoutDemo = function () {
var initDemo = function () {
$.sessionTimeout({
title: 'Session Timeout Notification',
message: 'Your session is about to expire.',
keepAliveUrl: HOST_URL + '/api//session-timeout/keepalive.php',
redirUrl: '?p=page_user_lock_1',
logoutUrl: '?p=page_user_login_1',
warnAfter: 5000, //warn after 5 seconds
redirAfter: 15000, //redirect after 15 secons,
ignoreUserActivity: true,
countdownMessage: 'Redirecting in {timer} seconds.',
countdownBar: true
});
}
return {
//main function to initiate the module
init: function () {
initDemo();
}
};
}();
jQuery(document).ready(function() {
KTSessionTimeoutDemo.init();
});