]> git.datanom.net - qtadmin.git/blobdiff - js/timer.js
reload page when session expire
[qtadmin.git] / js / timer.js
index 1db783cc22fd20c3a6dcce63988a6bbc507c2a48..5760242463e46040948dfa3b3d205f4dccd74dcc 100644 (file)
@@ -1,4 +1,4 @@
-/* vim: set ts=4 tw=0 sw=4 noet: */
+/* vim: set ts=4 tw=4 sw=4 noet: */
 var timerRef=setInterval(function(){myTimer()},1000);
 var timeStart = new Date().getTime() + timeout;
 
@@ -8,9 +8,10 @@ function myTimer() {
     var timeLeft = Math.round(((expire % 86400000) % 3600000) / 60000);
 
     if (timeLeft < 0) {
-        timeLeft = 'Expired';
-        document.getElementById("time").style.background = "red";
+        /*timeLeft = 'Expired';
+        document.getElementById("time").style.background = "red";*/
         clearInterval(timerRef);
+        location.reload();
     } else {
         timeLeft += 1;
         timeLeft = '< ' + timeLeft + ' min';
This page took 0.028781 seconds and 5 git commands to generate.