onload = function () {
var t;
window.top.onload = resetTimer;
window.top.onmousemove=resetTimer;
window.top.onmousemove = resetTimer;
window.top.onkeypress = resetTimer;
window.top.onclick = resetTimer;
function logout() {
Ext.Msg.show({
title: 'Please sign in again',
msg: 'Auto logout due to inactivity.',
buttons: Ext.MessageBox.OK,
width: 300,
closable: false,
fn: function (buttonId, text) {
if (buttonId == 'ok')
location.href = "<?php echo $this->createAbsoluteUrl('app/logout'); ?>";
}
});
}
function resetTimer() {
clearTimeout(t);
t = setTimeout(logout, 900000)
}
}
if (typeof console == "undefined" || typeof console.log == "undefined")
var console = {log: function () {
}};
</script>