1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00
Files
Radarr/src/UI/Shared/Toolbar/ButtonModel.js
T
Mark McDowall 6ba17782aa 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
2014-01-01 23:07:30 -08:00

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);
};
}
});
});