From 5a13cb5ffed70044c12665fdd7ee7ebbfeb5dd8a Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 4 Aug 2018 16:54:46 +0200 Subject: [PATCH] Fix jquery timeago update did not really work --- public/js/grocy.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/js/grocy.js b/public/js/grocy.js index 421cb200..ee185c78 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -71,7 +71,12 @@ if (window.localStorage.getItem("sidebar_state") === "collapsed") $.timeago.settings.allowFuture = true; RefreshContextualTimeago = function() { - $('time.timeago').timeago(); + $("time.timeago").each(function() + { + var element = $(this); + var timestamp = element.attr("datetime"); + element.timeago("update", timestamp); + }); } RefreshContextualTimeago();