mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-14 12:06:06 +00:00
Add session timeout warning
This commit is contained in:
@ -268,3 +268,20 @@ json_library = {
|
||||
.replace(jsonLine, json_library.replacer);
|
||||
}
|
||||
};
|
||||
|
||||
// set count down in second on an element
|
||||
function timer(elToUpdate, maxTime) {
|
||||
elToUpdate.text(maxTime + "s");
|
||||
|
||||
var interval = setInterval(function () {
|
||||
if (maxTime > 0) {
|
||||
maxTime--;
|
||||
elToUpdate.text(maxTime + "s");
|
||||
}
|
||||
else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
return interval;
|
||||
}
|
Reference in New Issue
Block a user