From 32701d5e8483dfb6e910c8d76225aaa2d8cb32b4 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 24 Apr 2013 17:23:07 -0700 Subject: [PATCH] Added tooltip to airdate on posters view --- UI/Series/Index/Posters/ItemTemplate.html | 4 ++-- UI/Series/Index/Posters/ItemView.js | 7 ++++++- UI/Series/SeriesModel.js | 9 +++++++++ UI/Series/series.less | 12 ++++++++++-- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/UI/Series/Index/Posters/ItemTemplate.html b/UI/Series/Index/Posters/ItemTemplate.html index 8fa008957..7b1a312e0 100644 --- a/UI/Series/Index/Posters/ItemTemplate.html +++ b/UI/Series/Index/Posters/ItemTemplate.html @@ -12,13 +12,13 @@ -
{{title}}
+
{{#if isContinuing}} {{#if bestDateString}} - {{bestDateString}} + {{bestDateString}} {{else}} {{statusText}} {{/if}} diff --git a/UI/Series/Index/Posters/ItemView.js b/UI/Series/Index/Posters/ItemView.js index 8891250ba..ef764623b 100644 --- a/UI/Series/Index/Posters/ItemView.js +++ b/UI/Series/Index/Posters/ItemView.js @@ -15,7 +15,8 @@ define([ ui: { - 'progressbar': '.progress .bar' + 'progressbar': '.progress .bar', + 'airDate': '.air-date' }, events: { @@ -27,6 +28,10 @@ define([ this.qualityProfileCollection = options.qualityProfiles; }, + onRender: function () { + this.ui.airDate.tooltip(); + }, + editSeries: function () { var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model}); diff --git a/UI/Series/SeriesModel.js b/UI/Series/SeriesModel.js index 4fffe122e..211992b45 100644 --- a/UI/Series/SeriesModel.js +++ b/UI/Series/SeriesModel.js @@ -58,6 +58,15 @@ } return 'Ended'; + }, + shortDate: function () { + var date = this.get('nextAiring'); + + if (!date) { + return ''; + } + + return Date.create(date).short(); } }, diff --git a/UI/Series/series.less b/UI/Series/series.less index 3135ca156..935c37ef0 100644 --- a/UI/Series/series.less +++ b/UI/Series/series.less @@ -50,10 +50,18 @@ opacity: 0.75; width: 138px; + :hover { + cursor: default; + } + .label { margin-top: 3px; display: block; } + + .tooltip { + opacity: 1; + } } .series-season { padding-bottom: 20px; @@ -75,8 +83,8 @@ -webkit-transform-origin: 50% 50%; position: absolute; width: 300px; - top: 180px; - left: -120px; + top: 175px; + left: -122px; text-align: center; } }