mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-29 19:28:27 -07: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:
parent
4d6d477947
commit
6ba17782aa
13 changed files with 414 additions and 123 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue