From a5b09b8975a48411e1af682a3904ccec44f8270d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 15 Dec 2014 19:43:41 -0800 Subject: [PATCH] Better times for tasks when not using relative dates --- src/UI/Cells/RelativeTimeCell.js | 11 +++++------ src/UI/System/Task/NextExecutionCell.js | 11 ++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/UI/Cells/RelativeTimeCell.js b/src/UI/Cells/RelativeTimeCell.js index d7a6363e1..48c8c8507 100644 --- a/src/UI/Cells/RelativeTimeCell.js +++ b/src/UI/Cells/RelativeTimeCell.js @@ -17,19 +17,18 @@ define( if (dateStr) { var date = moment(dateStr); var result = '{1}'; + 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; diff --git a/src/UI/System/Task/NextExecutionCell.js b/src/UI/System/Task/NextExecutionCell.js index be2e6007b..9c2bb990d 100644 --- a/src/UI/System/Task/NextExecutionCell.js +++ b/src/UI/System/Task/NextExecutionCell.js @@ -26,17 +26,18 @@ define( else { var result = '{1}'; + 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;