lemonldap-ng/lemonldap-ng-portal/site/coffee/globalLogout.coffee

21 lines
402 B
CoffeeScript
Raw Normal View History

2019-11-13 20:56:56 +01:00
# Timer for globalLogout page
i = 30
go = () ->
$("#globallogout").submit()
timer = () ->
h = $('#timer').html()
i-- if i>0
h = h.replace /\d+/, i
$('#timer').html(h)
window.setTimeout timer, 1000
$(document).ready ->
$(".data-epoch").each ->
myDate = new Date($(this).text() * 1000)
$(this).text(myDate.toLocaleString())
2019-11-13 20:56:56 +01:00
window.setTimeout go, 30000
window.setTimeout timer, 1000