Better times for tasks when not using relative dates

This commit is contained in:
Mark McDowall 2014-12-15 19:43:41 -08:00
parent bf169eb139
commit a5b09b8975
2 changed files with 11 additions and 11 deletions

View File

@ -17,19 +17,18 @@ define(
if (dateStr) {
var date = moment(dateStr);
var result = '<span title="{0}">{1}</span>';
var tooltip = date.format(UiSettings.longDateTime());
var text;
if (UiSettings.get('showRelativeDates')) {
var tooltip = date.format(UiSettings.longDateTime());
var text = date.fromNow();
this.$el.html(result.format(tooltip, text));
text = date.fromNow();
}
else {
this.$el.html(date.format(UiSettings.longDateTime()));
text = date.format(UiSettings.shortDateTime());
}
this.$el.html(result.format(tooltip, text));
}
return this;

View File

@ -26,17 +26,18 @@ define(
else {
var result = '<span title="{0}">{1}</span>';
var tooltip = nextExecution.format(UiSettings.longDateTime());
var text;
if (UiSettings.get('showRelativeDates')) {
var tooltip = nextExecution.format(UiSettings.longDateTime());
var text = nextExecution.fromNow();
this.$el.html(result.format(tooltip, text));
text = nextExecution.fromNow();
}
else {
this.$el.html(nextExecution.format(UiSettings.longDateTime()));
text = nextExecution.format(UiSettings.shortDateTime());
}
this.$el.html(result.format(tooltip, text));
}
return this;