[Kimchi-devel] [PATCH] [Wok] Blink dialog session timeout
peterpnns at gmail.com
peterpnns at gmail.com
Mon Sep 5 16:42:33 UTC 2016
From: Peter Pennings <peterpnns at gmail.com>
---
ui/js/src/wok.session.js | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/ui/js/src/wok.session.js b/ui/js/src/wok.session.js
index 4092ce8..92d928c 100644
--- a/ui/js/src/wok.session.js
+++ b/ui/js/src/wok.session.js
@@ -28,18 +28,20 @@ wok.session = {
expiringCounter: function(){
var counter = wok.session.remainingSessionTime - wok.session.remaingTimeToShowAlert;
- wok.session.expiringTimeout = setTimeout(function(){
- wok.session.flagInTimer = true;
- $("#session-expiring-alert").show();
- $("#session-expiring-alert p").html("<script>var message = i18n['WOKSESS0001M'].replace('%1', 30);"
- + "$('#session-expiring-alert p').html(message);"
- + "var n = 30;"
- + "wok.session.oneSecondExternalCounter = setTimeout(countDown,1000);"
- + "function countDown(){n--; if(n > 0){wok.session.oneSecondInternalCounter = setTimeout(countDown,1000);}"
- + "message = i18n['WOKSESS0001M'].replace('%1', n);"
- + "$('#session-expiring-alert p').html(message);}</script>"
- );
- }, counter);
+ if (!isNaN(counter)) {
+ wok.session.expiringTimeout = setTimeout(function(){
+ wok.session.flagInTimer = true;
+ $("#session-expiring-alert").show();
+ $("#session-expiring-alert p").html("<script>var message = i18n['WOKSESS0001M'].replace('%1', 30);"
+ + "$('#session-expiring-alert p').html(message);"
+ + "var n = 30;"
+ + "wok.session.oneSecondExternalCounter = setTimeout(countDown,1000);"
+ + "function countDown(){n--; if(n > 0){wok.session.oneSecondInternalCounter = setTimeout(countDown,1000);}"
+ + "message = i18n['WOKSESS0001M'].replace('%1', n);"
+ + "$('#session-expiring-alert p').html(message);}</script>"
+ );
+ }, counter);
+ }
},
refreshExpiringCounter: function() {
--
2.7.4
More information about the Kimchi-devel
mailing list