1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Series/Details/SeasonLayout.js

53 lines
1.4 KiB
JavaScript
Raw Normal View History

2013-04-23 05:07:21 +03:00
'use strict';
define(['app'], function () {
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
template: 'Series/Details/SeasonLayoutTemplate',
regions: {
episodeGrid: '#x-episode-grid'
},
columns: [
{
name : 'episodeNumber',
label : '#',
editable: false,
cell : 'integer'
},
{
name : 'title',
label : 'Title',
editable: false,
cell : 'string'
},
{
name : 'airDate',
label : 'Air Date',
editable : false,
2013-05-12 18:53:39 +03:00
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'
}));
}
});
});