You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/UI/Series/Details/SeasonLayout.js

56 lines
1.5 KiB

'use strict';
define(['app', 'Series/Details/EpisodeStatusCell'], function () {
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
template: 'Series/Details/SeasonLayoutTemplate',
regions: {
episodeGrid: '#x-episode-grid'
},
columns: [
{
name : 'episodeNumber',
label: '#',
cell : 'integer'
},
{
name : 'title',
label: 'Title',
cell : 'string'
},
{
name : 'airDate',
label: 'Air Date',
cell : 'date'
12 years ago
//formatter: new Backgrid.AirDateFormatter()
} ,
{
name : 'status',
label: 'Status',
cell : NzbDrone.Series.Details.EpisodeStatusCell
}
],
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'
}));
}
});
});