From 1a749bf7127c8060f9c1f5b8f242636050ee007c Mon Sep 17 00:00:00 2001 From: Basraah Date: Sat, 4 Feb 2017 09:41:18 +1000 Subject: [PATCH] Update timerboard javascript (#688) * Fix and update javascript Reformatted javascript. Updated javascript to reduce duplicate code. * Replace countdown and dateformat with moment Improves i18n Fixes #685 --- stock/templates/bundles/moment-js.html | 4 + .../templates/registered/timermanagement.html | 152 ++++++++++++------ 2 files changed, 105 insertions(+), 51 deletions(-) create mode 100644 stock/templates/bundles/moment-js.html diff --git a/stock/templates/bundles/moment-js.html b/stock/templates/bundles/moment-js.html new file mode 100644 index 00000000..5e1e6206 --- /dev/null +++ b/stock/templates/bundles/moment-js.html @@ -0,0 +1,4 @@ + +{% if locale and LANGUAGE_CODE != 'en' %} + +{% endif %} diff --git a/stock/templates/registered/timermanagement.html b/stock/templates/registered/timermanagement.html index bdc3332b..c76ad75c 100755 --- a/stock/templates/registered/timermanagement.html +++ b/stock/templates/registered/timermanagement.html @@ -138,7 +138,10 @@ {% endifequal %} {{ timer.eve_time | date:"Y-m-d H:i" }} -
+ +
+
+ {{ timer.eve_character.character_name }} {% if perms.auth.timer_management %} @@ -269,7 +272,10 @@ {% endifequal %} {{ timer.eve_time | date:"Y-m-d H:i" }} -
+ +
+
+ {{ timer.eve_character.character_name }} {% if perms.auth.timer_management %} @@ -401,7 +407,10 @@ {% endifequal %} {{ timer.eve_time | date:"Y-m-d H:i" }} -
+ +
+
+ {{ timer.eve_character.character_name }} {% if perms.auth.timer_management %} @@ -421,63 +430,104 @@ {% endif %} + {% include 'bundles/moment-js.html' with locale=True %} + - - - + function updateClock() { + document.getElementById("current-time").innerHTML = "" + moment().format('LLLL') + ""; + } + {% endblock content %}