mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-21 22:05:43 -04:00
6ba17782aa
New: Sorting is now persisted on a per page and browser basis New: Series lists now support sorting on all views
30 lines
787 B
JavaScript
30 lines
787 B
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'underscore',
|
|
'backbone'
|
|
], function (_, Backbone) {
|
|
return Backbone.Model.extend({
|
|
defaults: {
|
|
'target' : '/nzbdrone/route',
|
|
'title' : '',
|
|
'active' : false,
|
|
'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);
|
|
};
|
|
}
|
|
});
|
|
});
|