From 2fae57dbea77bd78042a1be572d4ae9060e6a965 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 27 Feb 2013 22:48:25 -0800 Subject: [PATCH] Added popover to show overview --- .../Calendar/CalendarCollectionView.js | 21 ++++++++++++++++++- NzbDrone.Backbone/Content/theme.css | 6 ++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Backbone/Calendar/CalendarCollectionView.js b/NzbDrone.Backbone/Calendar/CalendarCollectionView.js index 76d29df1f..2fe112a3c 100644 --- a/NzbDrone.Backbone/Calendar/CalendarCollectionView.js +++ b/NzbDrone.Backbone/Calendar/CalendarCollectionView.js @@ -28,7 +28,26 @@ define(['app', 'Calendar/CalendarItemView'], function (app) { prev: '', next: '' }, - events: this.getEvents + events: this.getEvents, + eventRender: function (event, element) { + element.popover({ + title: '{seriesTitle} - {season}x{episode} - {episodeTitle}'.assign({ + seriesTitle: event.seriesTitle, + season: event.seasonNumber, + episode: event.episodeNumber.pad(2), + episodeTitle: event.episodeTitle + }), + content: event.overview, + placement: 'bottom', + trigger: 'manual' + }); + }, + eventMouseover: function(event, jsEvent, view){ + $(this).popover('show'); + }, + eventMouseout: function(event, jsEvent, view){ + $(this).popover('hide'); + } }); NzbDrone.Calendar.CalendarCollectionView.Instance = this; diff --git a/NzbDrone.Backbone/Content/theme.css b/NzbDrone.Backbone/Content/theme.css index 7a2108f53..0c16963b0 100644 --- a/NzbDrone.Backbone/Content/theme.css +++ b/NzbDrone.Backbone/Content/theme.css @@ -851,3 +851,9 @@ ul.stat-list { .settings-group { margin-top: 40px; } + +/* ============== popover ============== */ +.popover-title { + white-space: nowrap; + text-transform: none; +} \ No newline at end of file