mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
Fixed: Initial sorting for Next Airing
This commit is contained in:
parent
442ab2b7c4
commit
4962db3b6a
3 changed files with 36 additions and 28 deletions
|
@ -17,8 +17,7 @@ define(
|
|||
'Series/Index/FooterView',
|
||||
'Series/Index/FooterModel',
|
||||
'Shared/Toolbar/ToolbarLayout',
|
||||
'underscore',
|
||||
'moment'
|
||||
'underscore'
|
||||
], function (Marionette,
|
||||
Backgrid,
|
||||
PosterCollectionView,
|
||||
|
@ -35,8 +34,7 @@ define(
|
|||
FooterView,
|
||||
FooterModel,
|
||||
ToolbarLayout,
|
||||
_,
|
||||
Moment) {
|
||||
_) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Series/Index/SeriesIndexLayoutTemplate',
|
||||
|
||||
|
@ -77,15 +75,7 @@ define(
|
|||
name : 'nextAiring',
|
||||
label : 'Next Airing',
|
||||
cell : RelativeDateCell,
|
||||
sortValue : function (model) {
|
||||
var nextAiring = model.get('nextAiring');
|
||||
|
||||
if (!nextAiring) {
|
||||
return Number.MAX_VALUE;
|
||||
}
|
||||
|
||||
return Moment(nextAiring).unix();
|
||||
}
|
||||
sortValue : SeriesCollection.sorters.nextAiring
|
||||
},
|
||||
{
|
||||
name : 'percentOfEpisodes',
|
||||
|
@ -162,15 +152,7 @@ define(
|
|||
{
|
||||
title : 'Next Airing',
|
||||
name : 'nextAiring',
|
||||
sortValue : function (model) {
|
||||
var nextAiring = model.get('nextAiring');
|
||||
|
||||
if (!nextAiring) {
|
||||
return Number.MAX_VALUE;
|
||||
}
|
||||
|
||||
return Moment(nextAiring).unix();
|
||||
}
|
||||
sortValue : SeriesCollection.sorters.nextAiring
|
||||
},
|
||||
{
|
||||
title: 'Episodes',
|
||||
|
@ -272,10 +254,6 @@ define(
|
|||
this.viewButtons
|
||||
];
|
||||
|
||||
if (this.showSortingButton) {
|
||||
rightButtons.splice(0, 0, this.sortingOptions);
|
||||
}
|
||||
|
||||
rightButtons.splice(0, 0, this.sortingOptions);
|
||||
|
||||
this.toolbar.show(new ToolbarLayout({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue