summaryrefslogtreecommitdiff
path: root/resources/assets/js
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-12-28 18:34:41 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2018-12-28 18:34:41 +0100
commit7b3901211a0165558eebca8fe7490ca79b09f97b (patch)
tree31d19b4122373e56ee1ab8b134b8172f3e86e00a /resources/assets/js
parent97bab8e0636f399e1b2401bf2aab67cff1f67fd0 (diff)
moment.js: Set language on initialization
closes #544 (Translation error german / english mix)
Diffstat (limited to 'resources/assets/js')
-rw-r--r--resources/assets/js/moment-countdown.js2
-rw-r--r--resources/assets/js/vendor.js4
2 files changed, 2 insertions, 4 deletions
diff --git a/resources/assets/js/moment-countdown.js b/resources/assets/js/moment-countdown.js
index f5effbc0..d12ee7ab 100644
--- a/resources/assets/js/moment-countdown.js
+++ b/resources/assets/js/moment-countdown.js
@@ -5,6 +5,8 @@
*/
$(document).ready(function () {
if (typeof moment !== 'undefined') {
+ moment.locale($('html').attr('lang'));
+
$.each($('.moment-countdown'), function (i, e) {
var span = $(e);
var text = span.html();
diff --git a/resources/assets/js/vendor.js b/resources/assets/js/vendor.js
index d9da845c..1d61d42b 100644
--- a/resources/assets/js/vendor.js
+++ b/resources/assets/js/vendor.js
@@ -9,10 +9,6 @@ require('./forms');
require('./sticky-headers');
require('./moment-countdown');
-$(function () {
- moment.locale($('html').attr('lang'));
-});
-
$.ajaxSetup({
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
});