-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Hello, this is my config :
<link rel="stylesheet" src="/assets/jalert/jAlert.css"/>
<script src="/assets/jalert/jAlert.min.js"></script>
<script src="/assets/jalert/jAlert-functions.min.js"></script>
<script src="/assets/jalert/jTimeout.min.js"></script>
<script>
$(function () {
$.jTimeout({
flashTitle: true, //whether or not to flash the tab/title bar when about to timeout, or after timing out
flashTitleSpeed: 500, //how quickly to switch between the original title, and the warning text
flashingTitleText: '**WARNING**', //what to show in the tab/title bar when about to timeout, or after timing out
originalTitle: document.title, //store the original title of this page
timeoutAfter: 60, //pass this from server side to be fully-dynamic. For PHP: ini_get('session.gc_maxlifetime'); - 1440 is generally the default timeout
heartbeat: 1, //how many seconds in between checking the expiration - warning: changing this can effect your prior countdown warning and timeout - for best results, stick with 1
extendOnMouseMove: true, //Whether or not to extend the session when the mouse is moved
mouseDebounce: 30, //How many seconds between extending the session when the mouse is moved (instead of extending a billion times within 5 seconds)
onMouseMove: false, //Override the standard $.get() request that uses the extendUrl with your own function.
extendUrl: '/index.xhtml', //URL to request in order to extend the session.
logoutUrl: '/auto-logout.xhtml', //URL to request in order to force a logout after the timeout. This way you can end a session early based on a shorter timeout OR if the front-end timeout doesn't sync with the backend one perfectly, you don't look like an idiot.
loginUrl: '/login.xhtml', //URL to send a customer when they want to log back in
secondsPrior: 30, //how many seconds before timing out to run the next callback (onPriorCallback)
onPriorCallback: false, //override the popup that shows when getting within x seconds of timing out
onClickExtend: false, //override the click to extend button callback
onTimeout: false, //override the timeout function if you'd like
onSessionExtended: false //override the session extension method (triggered only after a timeout)
}
);
$.jTimeout().getExpiration(); //gets the expiration date string
$.jTimeout().getSecondsTillExpiration(); //gets the number of seconds until the session expires
});
</script>
jQuery 3.4.1 / Chrome v 75.0
i get this error :
jTimeout.min.js:10 Uncaught TypeError: c.options.onPriorCallback is not a function
at countdown (jTimeout.min.js:10)
and then a series of :
jTimeout.min.js:10 Uncaught TypeError: c.options.onMouseMove is not a function
at HTMLBodyElement. (jTimeout.min.js:10)
at HTMLBodyElement.dispatch (jquery.js.xhtml?ln=primefaces&v=7.0.5:2)
at HTMLBodyElement.v.handle (jquery.js.xhtml?ln=primefaces&v=7.0.5:2)
the flashingTitleText: 'WARNING' is showed on the page title