mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Always show "Track date only" shore execution times without the time part
This commit is contained in:
@@ -302,6 +302,7 @@ RefreshContextualTimeago = function()
|
||||
|
||||
var isNever = timestamp && timestamp.substring(0, 10) == "2999-12-31";
|
||||
var isToday = timestamp && timestamp.length == 10 && timestamp.substring(0, 10) == moment().format("YYYY-MM-DD");
|
||||
var isDateWithoutTime = element.hasClass("timeago-date-only");
|
||||
|
||||
if (isNever)
|
||||
{
|
||||
@@ -315,6 +316,11 @@ RefreshContextualTimeago = function()
|
||||
{
|
||||
element.timeago("update", timestamp);
|
||||
}
|
||||
|
||||
if (isDateWithoutTime)
|
||||
{
|
||||
element.prev().text(element.prev().text().substring(0, 10));
|
||||
}
|
||||
});
|
||||
}
|
||||
RefreshContextualTimeago();
|
||||
|
Reference in New Issue
Block a user