mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 06:20:16 +02:00
fixes #364
This commit is contained in:
parent
f4ae7a4e2c
commit
d8d663519b
@ -81,13 +81,10 @@
|
|||||||
<script src="/static/js/dateformat.js"></script>
|
<script src="/static/js/dateformat.js"></script>
|
||||||
<script src="/static/js/countdown.js"></script>
|
<script src="/static/js/countdown.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var clockClosest = document.getElementById("countdownclosest"), targetDate = new Date(Date.UTC({{ ops.start | date:"Y, m-1, d, H, i" }}));{% for ops in optimer %}
|
|
||||||
var clock{{ ops.id }} = document.getElementById("countdown{{ ops.id }}"), targetDate{{ ops.id }} = new Date(Date.UTC({{ ops.start | date:"Y, m-1, d, H, i" }}));{% endfor %}
|
|
||||||
|
|
||||||
setInterval(function(){clockClosest.innerHTML = targetDate.format('D @ h:ia'); if (targetDate > Date.now()){ clockClosest.innerHTML = clockClosest.innerHTML + "<BR>" + countdown(targetDate).toString();}}, 1000);
|
{% for ops in optimer %}var clock{{ ops.id }} = document.getElementById("countdown{{ ops.id }}"), targetDate{{ ops.id }} = new Date(Date.UTC({{ ops.start | date:"Y, m-1, d, H, i" }}));{% endfor %}
|
||||||
{% for ops in optimer %}setInterval(function(){clock{{ ops.id }}.innerHTML = targetDate{{ ops.id }}.format('D @ h:ia'); if (targetDate{{ ops.id }} > Date.now()){ clock{{ ops.id }}.innerHTML = clock{{ ops.id }}.innerHTML + "<BR>" + countdown(targetDate{{ ops.id }}).toString();}}, 1000);{% endfor %}
|
{% for ops in optimer %}setInterval(function(){clock{{ ops.id }}.innerHTML = targetDate{{ ops.id }}.format('D @ h:ia'); if (targetDate{{ ops.id }} > Date.now()){ clock{{ ops.id }}.innerHTML = clock{{ ops.id }}.innerHTML + "<BR>" + countdown(targetDate{{ ops.id }}).toString();}}, 1000);{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
setInterval(function(){updateClock()}, 1000);
|
setInterval(function(){updateClock()}, 1000);
|
||||||
|
|
||||||
function updateClock() {
|
function updateClock() {
|
||||||
@ -97,5 +94,4 @@ function updateClock() {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user