diff --git a/UI/Calendar/CalendarView.js b/UI/Calendar/CalendarView.js index 2575e94c3..91976be28 100644 --- a/UI/Calendar/CalendarView.js +++ b/UI/Calendar/CalendarView.js @@ -2,10 +2,12 @@ define( [ + 'app', 'marionette', 'Calendar/Collection', + 'Episode/Layout', 'fullcalendar' - ], function (Marionette, CalendarCollection) { + ], function (App, Marionette, CalendarCollection, EpisodeLayout) { var _instance; @@ -33,24 +35,10 @@ define( eventRender : function (event, element) { $(element).addClass(event.statusLevel); $(element).children('.fc-event-inner').addClass(event.statusLevel); - - element.popover({ - title : '{seriesTitle} - {season}x{episode} - {episodeTitle}'.assign({ - seriesTitle : event.title, - season : event.seasonNumber, - episode : event.episodeNumber.pad(2), - episodeTitle: event.episodeTitle - }), - content : event.overview, - placement: 'bottom', - trigger : 'manual' - }); }, - eventMouseover: function () { - $(this).popover('show'); - }, - eventMouseout : function () { - $(this).popover('hide'); + eventClick : function (event) { + var view = new EpisodeLayout({ model: event.model }); + App.modalRegion.show(view); } }); @@ -73,10 +61,14 @@ define( var seriesTitle = element.get('series').get('title'); var start = element.get('airDate'); - element.set('title', seriesTitle); - element.set('episodeTitle', episodeTitle); - element.set('start', start); - element.set('allDay', false); + element.set({ + 'title': seriesTitle, + episodeTitle: episodeTitle, + start: start, + allDay: false + }); + + element.set('model', element); }); callback(calendarCollection.toJSON()); diff --git a/UI/Calendar/UpcomingItemTemplate.html b/UI/Calendar/UpcomingItemTemplate.html index d92aa0ee3..af9fd5854 100644 --- a/UI/Calendar/UpcomingItemTemplate.html +++ b/UI/Calendar/UpcomingItemTemplate.html @@ -7,4 +7,5 @@

{{series.title}}

{{startTime}} {{ShortDate airDate}}{{seasonNumber}}x{{paddedEpisodeNumber}}
{{episodeTitle}}

+

{{title}}

diff --git a/UI/Calendar/UpcomingItemView.js b/UI/Calendar/UpcomingItemView.js index eec39440e..1e8a44780 100644 --- a/UI/Calendar/UpcomingItemView.js +++ b/UI/Calendar/UpcomingItemView.js @@ -2,10 +2,21 @@ define( [ - 'marionette' - ], function (Marionette) { + 'app', + 'marionette', + 'Episode/Layout' + ], function (App, Marionette, EpisodeLayout) { return Marionette.ItemView.extend({ template: 'Calendar/UpcomingItemTemplate', - tagName : 'div' + tagName : 'div', + + events : { + 'click .x-episode-title' : '_showEpisodeDetails' + }, + + _showEpisodeDetails : function() { + var view = new EpisodeLayout({ model: this.model }); + App.modalRegion.show(view); + } }); }); diff --git a/UI/Calendar/calendar.less b/UI/Calendar/calendar.less index 7f6186f3a..4403883a8 100644 --- a/UI/Calendar/calendar.less +++ b/UI/Calendar/calendar.less @@ -1,3 +1,8 @@ +@import "../content/Bootstrap/mixins"; +@import "../content/Bootstrap/variables"; +@import "../content/Bootstrap/buttons"; +@import "../Shared/Styles/clickable"; + .calendar { th, td { border-color : #eeeeee; @@ -15,6 +20,10 @@ text-align : center; } + .fc-event { + .clickable; + } + .info { border-color : #14b8d4; background-color : #14b8d4; @@ -85,6 +94,7 @@ p { color : #999999; + margin: 0px; } .danger { @@ -118,4 +128,10 @@ .success { border-color : #4cb158; } + + .episode-title { + .btn-link; + color: @linkColor; + margin-top: 1px; + } }