From 56a34b5ea6a1ad401ee4cfe74e1acea54fc02ee5 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 28 Jul 2013 19:30:01 -0700 Subject: [PATCH] Downloaded overrides other statuses. --- UI/Calendar/CalendarView.js | 10 +++++----- UI/Handlebars/Helpers/Episode.js | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/Calendar/CalendarView.js b/UI/Calendar/CalendarView.js index 9f5a141b0..042960ca1 100644 --- a/UI/Calendar/CalendarView.js +++ b/UI/Calendar/CalendarView.js @@ -85,7 +85,11 @@ define( var statusLevel = 'primary'; - if (currentTime.isAfter(start) && currentTime.isBefore(end)) { + if (hasFile) { + statusLevel = 'success'; + } + + else if (currentTime.isAfter(start) && currentTime.isBefore(end)) { statusLevel = 'warning'; } @@ -93,10 +97,6 @@ define( statusLevel = 'danger'; } - else if (hasFile) { - statusLevel = 'success'; - } - var test = currentTime.startOf('day').format('LLLL'); if (end.isBefore(currentTime.startOf('day'))) { diff --git a/UI/Handlebars/Helpers/Episode.js b/UI/Handlebars/Helpers/Episode.js index 463d37eb3..48da01c3e 100644 --- a/UI/Handlebars/Helpers/Episode.js +++ b/UI/Handlebars/Helpers/Episode.js @@ -24,6 +24,10 @@ define( var start = Moment(this.airDateUtc); var end = Moment(this.end); + if (hasFile) { + return 'success'; + } + if (currentTime.isAfter(start) && currentTime.isBefore(end)) { return 'warning'; } @@ -32,10 +36,6 @@ define( return 'danger'; } - if (hasFile) { - return 'success'; - } - return 'primary'; });