2018-06-06 22:21:56 +02:00
|
|
|
// Generated by CoffeeScript 1.9.3
|
2017-01-19 12:33:11 +01:00
|
|
|
(function() {
|
|
|
|
var _go, go, i, stop, timer;
|
2014-02-06 17:48:02 +01:00
|
|
|
|
2017-01-19 12:33:11 +01:00
|
|
|
i = 30;
|
2014-02-06 17:48:02 +01:00
|
|
|
|
2017-01-19 12:33:11 +01:00
|
|
|
_go = 1;
|
2014-02-06 17:48:02 +01:00
|
|
|
|
2017-01-19 12:33:11 +01:00
|
|
|
stop = function() {
|
|
|
|
_go = 0;
|
2018-06-06 22:21:56 +02:00
|
|
|
return $('#divToHide').hide();
|
2017-01-19 12:33:11 +01:00
|
|
|
};
|
2014-02-06 17:48:02 +01:00
|
|
|
|
2017-01-19 12:33:11 +01:00
|
|
|
go = function() {
|
|
|
|
if (_go) {
|
|
|
|
return $("#form").submit();
|
|
|
|
}
|
|
|
|
};
|
2014-02-06 17:48:02 +01:00
|
|
|
|
2017-01-19 12:33:11 +01:00
|
|
|
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']) {
|
2017-03-16 21:19:06 +01:00
|
|
|
window.setTimeout(go, 30000);
|
2017-01-19 22:48:07 +01:00
|
|
|
window.setTimeout(timer, 1000);
|
2017-01-19 12:33:11 +01:00
|
|
|
} else {
|
2017-01-19 22:48:07 +01:00
|
|
|
stop;
|
2017-01-19 12:33:11 +01:00
|
|
|
}
|
2017-01-19 22:48:07 +01:00
|
|
|
return $("#wait").on('click', function() {
|
|
|
|
return stop();
|
|
|
|
});
|
2017-01-19 12:33:11 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
}).call(this);
|