Fix sorting of unkown release date.

pull/2/head
Leonardo Galli 8 years ago
parent 5e8b617625
commit 92e9dc6ee1

@ -8,7 +8,7 @@ module.exports = TemplatedCell.extend({
"July", "August", "September", "October", "November", "December"
];
this.$el.html("To be announced");
this.$el.html("");
if (this.model.get("inCinemas")) {
var cinemasDate = new Date(this.model.get("inCinemas"));

@ -100,7 +100,18 @@ var Collection = PageableCollection.extend({
return percentOfEpisodes + episodeCount / 1000000;
}
},
inCinemas : {
sortValue : function(model, attr) {
var monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
if (model.get("inCinemas")) {
return model.get("inCinemas");
}
return "2100-01-01";
}
},
path : {
sortValue : function(model) {
var path = model.get('path');

Loading…
Cancel
Save