1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 09:47:39 +00:00

fixed on air for upcoming view

This commit is contained in:
Mark McDowall 2013-08-21 17:24:38 -07:00
parent b1fa306223
commit 8737cb0145
3 changed files with 14 additions and 4 deletions

View file

@ -3,16 +3,27 @@
define(
[
'app',
'marionette'
], function (App, Marionette) {
'marionette',
'moment'
], function (App, Marionette, Moment) {
return Marionette.ItemView.extend({
template: 'Calendar/UpcomingItemTemplate',
template: 'Calendar/UpcomingItemViewTemplate',
tagName : 'div',
events: {
'click .x-episode-title': '_showEpisodeDetails'
},
initialize: function () {
var start = this.model.get('airDateUtc');
var runtime = this.model.get('series').runtime;
var end = Moment(start).add('minutes', runtime);
this.model.set({
end: end
})
},
_showEpisodeDetails: function () {
App.vent.trigger(App.Commands.ShowEpisodeDetails, {episode: this.model});
}

View file

@ -1,5 +1,4 @@
<div class="episode-info">
{{debug}}
{{#with series}}
{{qualityProfile qualityProfileId}}
<span class="label label-info">{{network}}</span>