You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/UI/History/Collection.js

42 lines
1.0 KiB

'use strict';
define(
[
'History/Model',
'backbone.pageable'
], function ( HistoryModel, PageableCollection) {
return PageableCollection.extend({
url : window.ApiRoot + '/history',
model: HistoryModel,
12 years ago
state: {
pageSize: 15,
sortKey : 'date',
order : 1
},
12 years ago
queryParams: {
totalPages : null,
totalRecords: null,
pageSize : 'pageSize',
sortKey : 'sortKey',
order : 'sortDir',
directions : {
'-1': 'asc',
'1' : 'desc'
}
},
12 years ago
parseState: function (resp) {
return {totalRecords: resp.totalRecords};
},
12 years ago
parseRecords: function (resp) {
if (resp) {
return resp.records;
}
12 years ago
return resp;
}
});
12 years ago
});