From 940c3bdf08fc3ccf521252e8ba1baadbef4e0feb Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 26 Dec 2014 13:48:13 -0800 Subject: [PATCH] More 24 hour fixes --- src/UI/Activity/Queue/TimeleftCell.js | 11 ++++++++--- src/UI/Release/AgeCell.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/UI/Activity/Queue/TimeleftCell.js b/src/UI/Activity/Queue/TimeleftCell.js index c0c8eed11..a4171fdc1 100644 --- a/src/UI/Activity/Queue/TimeleftCell.js +++ b/src/UI/Activity/Queue/TimeleftCell.js @@ -4,8 +4,10 @@ define( [ 'Cells/NzbDroneCell', 'filesize', - 'moment' - ], function (NzbDroneCell, fileSize, moment) { + 'moment', + 'Shared/UiSettingsModel', + 'Shared/FormatHelpers' + ], function (NzbDroneCell, fileSize, moment, UiSettingsModel, FormatHelpers) { return NzbDroneCell.extend({ className: 'timeleft-cell', @@ -17,8 +19,11 @@ define( //If the release is pending we want to use the timeleft as the time it will be processed at if (this.cellValue.get('status').toLowerCase() === 'pending') { + var ect = this.cellValue.get('estimatedCompletionTime'); + var time = '{0} at {1}'.format(FormatHelpers.relativeDate(ect), moment(ect).format(UiSettingsModel.time(true, false))); + this.$el.html('-'); - this.$el.attr('title', 'Will be processed during the first RSS Sync after {0}'.format(moment(this.cellValue.get('estimatedCompletionTime')).calendar())); + this.$el.attr('title', 'Will be processed during the first RSS Sync after {0}'.format(time)); this.$el.attr('data-container', 'body'); return this; diff --git a/src/UI/Release/AgeCell.js b/src/UI/Release/AgeCell.js index 1e1c8b795..8594d769f 100644 --- a/src/UI/Release/AgeCell.js +++ b/src/UI/Release/AgeCell.js @@ -4,7 +4,7 @@ define( 'backgrid', 'Shared/UiSettingsModel', 'Shared/FormatHelpers' - ], function (moment, Backgrid, UiSettings, FormatHelpers) { + ], function (moment, Backgrid, UiSettings) { return Backgrid.Cell.extend({ className: 'age-cell',