2013-04-23 05:07:21 +03:00
|
|
|
'use strict';
|
2013-05-15 04:17:24 +03:00
|
|
|
define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
2013-04-23 05:07:21 +03:00
|
|
|
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
|
|
|
template: 'Series/Details/SeasonLayoutTemplate',
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
episodeGrid: '#x-episode-grid'
|
|
|
|
},
|
|
|
|
|
|
|
|
columns: [
|
2013-05-15 04:17:24 +03:00
|
|
|
{
|
|
|
|
name : 'details',
|
2013-05-17 06:47:28 +03:00
|
|
|
label : 'Details',
|
2013-05-15 04:17:24 +03:00
|
|
|
cell : NzbDrone.Series.Details.EpisodeDetailCell
|
|
|
|
},
|
2013-04-23 05:07:21 +03:00
|
|
|
{
|
|
|
|
name : 'episodeNumber',
|
|
|
|
label : '#',
|
|
|
|
cell : 'integer'
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
cell : 'string'
|
|
|
|
},
|
|
|
|
{
|
2013-05-15 04:17:24 +03:00
|
|
|
name : 'airDate',
|
|
|
|
label : 'Air Date',
|
|
|
|
cell : 'date'
|
2013-04-25 07:27:49 +03:00
|
|
|
//formatter: new Backgrid.AirDateFormatter()
|
2013-04-23 05:07:21 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
this.episodeCollection = new NzbDrone.Series.EpisodeCollection();
|
|
|
|
this.episodeCollection.fetch({data: {
|
|
|
|
seriesId : this.model.get('seriesId'),
|
|
|
|
seasonNumber: this.model.get('seasonNumber')
|
|
|
|
}});
|
|
|
|
},
|
|
|
|
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
this.episodeGrid.show(new Backgrid.Grid(
|
|
|
|
{
|
|
|
|
columns : this.columns,
|
|
|
|
collection: this.episodeCollection,
|
|
|
|
className : 'table table-hover'
|
|
|
|
}));
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|