lemonldap-ng/lemonldap-ng-portal/site/htdocs/static/common/js/info.js
2019-03-25 21:46:17 +01:00

44 lines
736 B
JavaScript

// Generated by CoffeeScript 1.12.8
(function() {
var _go, go, i, stop, timer;
i = 30;
_go = 1;
stop = function() {
_go = 0;
return $('#divToHide').hide();
};
go = function() {
if (_go) {
return $("#form").submit();
}
};
timer = function() {
var h;
h = $('#timer').html();
if (i > 0) {
i--;
}
h = h.replace(/\d+/, i);
$('#timer').html(h);
return window.setTimeout(timer, 1000);
};
$(document).ready(function() {
if (window.datas['activeTimer']) {
window.setTimeout(go, 30000);
window.setTimeout(timer, 1000);
} else {
stop;
}
return $("#wait").on('click', function() {
return stop();
});
});
}).call(this);