mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
cleaned up all the cells. there is a cell for pretty much everything.
This commit is contained in:
parent
ac3582d5c4
commit
70cfa5e685
42 changed files with 432 additions and 261 deletions
|
@ -1,64 +1,68 @@
|
|||
'use strict';
|
||||
define(['app', 'Series/Details/EpisodeStatusCell', 'Series/Details/EpisodeTitleCell','Shared/Cells/ToggleCell'], function () {
|
||||
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Series/Details/SeasonLayoutTemplate',
|
||||
define([
|
||||
'app',
|
||||
'Cells/EpisodeStatusCell',
|
||||
'Cells/EpisodeTitleCell',
|
||||
'Cells/AirDateCell',
|
||||
'Cells/ToggleCell'],
|
||||
function () {
|
||||
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Series/Details/SeasonLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
episodeGrid: '#x-episode-grid'
|
||||
},
|
||||
|
||||
columns: [
|
||||
|
||||
{
|
||||
name : 'ignored',
|
||||
label: '',
|
||||
cell : NzbDrone.Shared.Cells.ToggleCell,
|
||||
trueClass : 'icon-bookmark-empty',
|
||||
falseClass :'icon-bookmark'
|
||||
},
|
||||
{
|
||||
name : 'episodeNumber',
|
||||
label: '#',
|
||||
cell : Backgrid.IntegerCell.extend({
|
||||
className: 'episode-number-cell'
|
||||
})
|
||||
regions: {
|
||||
episodeGrid: '#x-episode-grid'
|
||||
},
|
||||
|
||||
{
|
||||
name : 'title',
|
||||
label: 'Title',
|
||||
cell : NzbDrone.Series.Details.EpisodeTitleCell
|
||||
},
|
||||
{
|
||||
name : 'airDate',
|
||||
label: 'Air Date',
|
||||
cell : Backgrid.DateCell.extend({
|
||||
className: 'episode-air-date-cell'
|
||||
})
|
||||
} ,
|
||||
{
|
||||
name : 'status',
|
||||
label: 'Status',
|
||||
cell : NzbDrone.Series.Details.EpisodeStatusCell
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
|
||||
initialize: function (options) {
|
||||
|
||||
if (!options.episodeCollection) {
|
||||
throw 'episodeCollection is needed';
|
||||
}
|
||||
|
||||
this.episodeCollection = options.episodeCollection.bySeason(this.model.get('seasonNumber'));
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.episodeGrid.show(new Backgrid.Grid(
|
||||
{
|
||||
columns : this.columns,
|
||||
collection: this.episodeCollection,
|
||||
className : 'table table-hover season-grid'
|
||||
}));
|
||||
}
|
||||
name : 'ignored',
|
||||
label : '',
|
||||
cell : NzbDrone.Cells.ToggleCell,
|
||||
trueClass : 'icon-bookmark-empty',
|
||||
falseClass: 'icon-bookmark'
|
||||
},
|
||||
{
|
||||
name : 'episodeNumber',
|
||||
label: '#',
|
||||
cell : Backgrid.IntegerCell.extend({
|
||||
className: 'episode-number-cell'
|
||||
})
|
||||
},
|
||||
|
||||
{
|
||||
name : 'this',
|
||||
label: 'Title',
|
||||
cell : NzbDrone.Cells.EpisodeTitleCell
|
||||
},
|
||||
{
|
||||
name : 'airDate',
|
||||
label: 'Air Date',
|
||||
cell : NzbDrone.Cells.AirDateCell
|
||||
} ,
|
||||
{
|
||||
name : 'status',
|
||||
label: 'Status',
|
||||
cell : NzbDrone.Cells.EpisodeStatusCell
|
||||
}
|
||||
],
|
||||
|
||||
initialize: function (options) {
|
||||
|
||||
if (!options.episodeCollection) {
|
||||
throw 'episodeCollection is needed';
|
||||
}
|
||||
|
||||
this.episodeCollection = options.episodeCollection.bySeason(this.model.get('seasonNumber'));
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.episodeGrid.show(new Backgrid.Grid(
|
||||
{
|
||||
columns : this.columns,
|
||||
collection: this.episodeCollection,
|
||||
className : 'table table-hover season-grid'
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue