|
|
@ -17,8 +17,7 @@ define(
|
|
|
|
'Series/Index/FooterView',
|
|
|
|
'Series/Index/FooterView',
|
|
|
|
'Series/Index/FooterModel',
|
|
|
|
'Series/Index/FooterModel',
|
|
|
|
'Shared/Toolbar/ToolbarLayout',
|
|
|
|
'Shared/Toolbar/ToolbarLayout',
|
|
|
|
'underscore',
|
|
|
|
'underscore'
|
|
|
|
'moment'
|
|
|
|
|
|
|
|
], function (Marionette,
|
|
|
|
], function (Marionette,
|
|
|
|
Backgrid,
|
|
|
|
Backgrid,
|
|
|
|
PosterCollectionView,
|
|
|
|
PosterCollectionView,
|
|
|
@ -35,8 +34,7 @@ define(
|
|
|
|
FooterView,
|
|
|
|
FooterView,
|
|
|
|
FooterModel,
|
|
|
|
FooterModel,
|
|
|
|
ToolbarLayout,
|
|
|
|
ToolbarLayout,
|
|
|
|
_,
|
|
|
|
_) {
|
|
|
|
Moment) {
|
|
|
|
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
template: 'Series/Index/SeriesIndexLayoutTemplate',
|
|
|
|
template: 'Series/Index/SeriesIndexLayoutTemplate',
|
|
|
|
|
|
|
|
|
|
|
@ -77,15 +75,7 @@ define(
|
|
|
|
name : 'nextAiring',
|
|
|
|
name : 'nextAiring',
|
|
|
|
label : 'Next Airing',
|
|
|
|
label : 'Next Airing',
|
|
|
|
cell : RelativeDateCell,
|
|
|
|
cell : RelativeDateCell,
|
|
|
|
sortValue : function (model) {
|
|
|
|
sortValue : SeriesCollection.sorters.nextAiring
|
|
|
|
var nextAiring = model.get('nextAiring');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!nextAiring) {
|
|
|
|
|
|
|
|
return Number.MAX_VALUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Moment(nextAiring).unix();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name : 'percentOfEpisodes',
|
|
|
|
name : 'percentOfEpisodes',
|
|
|
@ -162,15 +152,7 @@ define(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title : 'Next Airing',
|
|
|
|
title : 'Next Airing',
|
|
|
|
name : 'nextAiring',
|
|
|
|
name : 'nextAiring',
|
|
|
|
sortValue : function (model) {
|
|
|
|
sortValue : SeriesCollection.sorters.nextAiring
|
|
|
|
var nextAiring = model.get('nextAiring');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!nextAiring) {
|
|
|
|
|
|
|
|
return Number.MAX_VALUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Moment(nextAiring).unix();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Episodes',
|
|
|
|
title: 'Episodes',
|
|
|
@ -272,10 +254,6 @@ define(
|
|
|
|
this.viewButtons
|
|
|
|
this.viewButtons
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
if (this.showSortingButton) {
|
|
|
|
|
|
|
|
rightButtons.splice(0, 0, this.sortingOptions);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rightButtons.splice(0, 0, this.sortingOptions);
|
|
|
|
rightButtons.splice(0, 0, this.sortingOptions);
|
|
|
|
|
|
|
|
|
|
|
|
this.toolbar.show(new ToolbarLayout({
|
|
|
|
this.toolbar.show(new ToolbarLayout({
|
|
|
|