mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Fix jquery timeago update did not really work
This commit is contained in:
@@ -71,7 +71,12 @@ if (window.localStorage.getItem("sidebar_state") === "collapsed")
|
|||||||
$.timeago.settings.allowFuture = true;
|
$.timeago.settings.allowFuture = true;
|
||||||
RefreshContextualTimeago = function()
|
RefreshContextualTimeago = function()
|
||||||
{
|
{
|
||||||
$('time.timeago').timeago();
|
$("time.timeago").each(function()
|
||||||
|
{
|
||||||
|
var element = $(this);
|
||||||
|
var timestamp = element.attr("datetime");
|
||||||
|
element.timeago("update", timestamp);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
RefreshContextualTimeago();
|
RefreshContextualTimeago();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user