mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Replace Timeago with momentjs (#1687)
* Replaced timeago with moment.fromNow * Fixed datetime when best_before_date is empty * Removed the now unnecessary timeago package * Removed not longer localization strings * Check for empty instead of string comparison Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -316,7 +316,6 @@ if (window.localStorage.getItem("sidebar_state") === "collapsed")
|
||||
$("#sidenavToggler").click();
|
||||
}
|
||||
|
||||
$.timeago.settings.allowFuture = true;
|
||||
RefreshContextualTimeago = function(rootSelector = "#page-content")
|
||||
{
|
||||
$(rootSelector + " time.timeago").each(function()
|
||||
@@ -352,7 +351,7 @@ RefreshContextualTimeago = function(rootSelector = "#page-content")
|
||||
}
|
||||
else
|
||||
{
|
||||
element.timeago("update", timestamp);
|
||||
element.text(moment(timestamp).fromNow());
|
||||
}
|
||||
|
||||
if (isDateWithoutTime)
|
||||
|
Reference in New Issue
Block a user