1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

Sorting on all series views is now working

New: Sorting is now persisted on a per page and browser basis
New: Series lists now support sorting on all views
This commit is contained in:
Mark McDowall
2013-12-27 00:31:34 -08:00
parent 4d6d477947
commit 6ba17782aa
13 changed files with 414 additions and 123 deletions
+18 -2
View File
@@ -1,13 +1,29 @@
'use strict';
define(
[
'underscore',
'backbone'
], function (Backbone) {
], function (_, Backbone) {
return Backbone.Model.extend({
defaults: {
'target' : '/nzbdrone/route',
'title' : '',
'active' : false,
'tooltip': undefined }
'tooltip': undefined
},
sortValue: function () {
var sortValue = this.get('sortValue');
if (_.isString(sortValue)) {
return this[sortValue];
}
else if (_.isFunction(sortValue)) {
return sortValue;
}
return function (model, colName) {
return model.get(colName);
};
}
});
});