mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Default sort ordering.
Upcoming won't obey the comparator though.
This commit is contained in:
parent
eae414e8be
commit
e37f413e19
@ -3,8 +3,11 @@ define(['app', 'Series/EpisodeModel'], function () {
|
|||||||
NzbDrone.Calendar.CalendarCollection = Backbone.Collection.extend({
|
NzbDrone.Calendar.CalendarCollection = Backbone.Collection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
||||||
model : NzbDrone.Series.EpisodeModel,
|
model : NzbDrone.Series.EpisodeModel,
|
||||||
comparator: function (model) {
|
|
||||||
return model.get('airDate');
|
comparator: function(model) {
|
||||||
|
var date = new Date(model.get('airDate'));
|
||||||
|
var time = date.getTime();
|
||||||
|
return time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -4,17 +4,13 @@ define(['app', 'Series/SeriesModel'], function () {
|
|||||||
url : NzbDrone.Constants.ApiRoot + '/series',
|
url : NzbDrone.Constants.ApiRoot + '/series',
|
||||||
model: NzbDrone.Series.SeriesModel,
|
model: NzbDrone.Series.SeriesModel,
|
||||||
|
|
||||||
mode: 'client',
|
comparator: function(model) {
|
||||||
|
return model.get('title');
|
||||||
|
},
|
||||||
|
|
||||||
state: {
|
state: {
|
||||||
sortKey: "title",
|
sortKey: "title",
|
||||||
order: -1,
|
order: -1
|
||||||
pageSize: 1000000
|
|
||||||
},
|
|
||||||
|
|
||||||
queryParams: {
|
|
||||||
sortKey: null,
|
|
||||||
order: null
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user