|
@@ -233,6 +233,8 @@ if USE_NEW_EDITOR.get():
|
|
|
// sets global apiHelper TTL
|
|
// sets global apiHelper TTL
|
|
|
$.totalStorage('hue.cacheable.ttl', ${conf.CUSTOM.CACHEABLE_TTL.get()});
|
|
$.totalStorage('hue.cacheable.ttl', ${conf.CUSTOM.CACHEABLE_TTL.get()});
|
|
|
|
|
|
|
|
|
|
+ var IDLE_SESSION_TIMEOUT = -1;
|
|
|
|
|
+
|
|
|
$(document).ready(function () {
|
|
$(document).ready(function () {
|
|
|
// forces IE's ajax calls not to cache
|
|
// forces IE's ajax calls not to cache
|
|
|
if ($.browser.msie) {
|
|
if ($.browser.msie) {
|
|
@@ -251,13 +253,14 @@ if USE_NEW_EDITOR.get():
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
%if conf.AUTH.IDLE_SESSION_TIMEOUT.get() > -1 and not skip_idle_timeout:
|
|
%if conf.AUTH.IDLE_SESSION_TIMEOUT.get() > -1 and not skip_idle_timeout:
|
|
|
|
|
+ IDLE_SESSION_TIMEOUT = ${conf.AUTH.IDLE_SESSION_TIMEOUT.get()};
|
|
|
var idleTimer;
|
|
var idleTimer;
|
|
|
function resetIdleTimer() {
|
|
function resetIdleTimer() {
|
|
|
clearTimeout(idleTimer);
|
|
clearTimeout(idleTimer);
|
|
|
idleTimer = setTimeout(function () {
|
|
idleTimer = setTimeout(function () {
|
|
|
// Check if logged out
|
|
// Check if logged out
|
|
|
$.get('/desktop/debug/is_idle');
|
|
$.get('/desktop/debug/is_idle');
|
|
|
- }, (${conf.AUTH.IDLE_SESSION_TIMEOUT.get()} * 1000) + 1000);
|
|
|
|
|
|
|
+ }, (IDLE_SESSION_TIMEOUT * 1000) + 1000);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$(document).on('mousemove', resetIdleTimer);
|
|
$(document).on('mousemove', resetIdleTimer);
|