2017-01-19 12:33:11 +01:00
|
|
|
// Generated by CoffeeScript 1.10.0
|
|
|
|
(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;
|
|
|
|
return $('#timer').html("...");
|
|
|
|
};
|
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']) {
|
|
|
|
window.setTimeout(go, 10000);
|
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);
|