Added popover to show overview

This commit is contained in:
Mark McDowall 2013-02-27 22:48:25 -08:00
parent a80c2fb1f3
commit 2fae57dbea
2 changed files with 26 additions and 1 deletions

View File

@ -28,7 +28,26 @@ define(['app', 'Calendar/CalendarItemView'], function (app) {
prev: '<i class="icon-arrow-left"></i>', prev: '<i class="icon-arrow-left"></i>',
next: '<i class="icon-arrow-right"></i>' next: '<i class="icon-arrow-right"></i>'
}, },
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; NzbDrone.Calendar.CalendarCollectionView.Instance = this;

View File

@ -851,3 +851,9 @@ ul.stat-list {
.settings-group { .settings-group {
margin-top: 40px; margin-top: 40px;
} }
/* ============== popover ============== */
.popover-title {
white-space: nowrap;
text-transform: none;
}