lemonldap-ng/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.js

38 lines
692 B
JavaScript
Raw Normal View History

2020-10-09 22:29:56 +02:00
// Generated by CoffeeScript 1.12.8
2017-01-19 22:48:07 +01:00
(function() {
var go, i, timer, timerIsEnabled;
2017-01-19 22:48:07 +01:00
i = 5;
timerIsEnabled = 0;
2017-01-19 22:48:07 +01:00
go = function() {
if (timerIsEnabled) {
return $("#form").submit();
}
2017-01-19 22:48:07 +01:00
};
2017-01-19 22:48:07 +01:00
timer = function() {
var h;
h = $('#timer').html();
if (h) {
timerIsEnabled = 1;
if (i > 0) {
i--;
}
h = h.replace(/\d+/, i);
$('#timer').html(h);
return setTimeout(timer, 1000);
2017-01-19 22:48:07 +01:00
}
};
2017-01-19 22:48:07 +01:00
$(document).ready(function() {
2017-03-19 07:10:19 +01:00
setTimeout(go, 30000);
2017-01-19 22:48:07 +01:00
setTimeout(timer, 1000);
2017-05-18 20:13:07 +02:00
return $("#refuse").on('click', function() {
2017-01-19 22:48:07 +01:00
return $("#confirm").attr("value", $(this).attr("val"));
});
});
}).call(this);