mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
removed NzbDrone. namespace, everything is done using require.
This commit is contained in:
parent
ef62af75df
commit
b0bd3f34f1
121 changed files with 2570 additions and 2587 deletions
|
@ -1,37 +1,41 @@
|
|||
'use strict';
|
||||
define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryModel, PageableCollection) {
|
||||
return PageableCollection.extend({
|
||||
url : NzbDrone.Constants.ApiRoot + '/history',
|
||||
model : NzbDrone.History.Model,
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'History/Model',
|
||||
'backbone.pageable'
|
||||
], function ( HistoryModel, PageableCollection) {
|
||||
return PageableCollection.extend({
|
||||
url : window.ApiRoot + '/history',
|
||||
model: HistoryModel,
|
||||
|
||||
state: {
|
||||
pageSize: 15,
|
||||
sortKey: 'date',
|
||||
order: 1
|
||||
},
|
||||
state: {
|
||||
pageSize: 15,
|
||||
sortKey : 'date',
|
||||
order : 1
|
||||
},
|
||||
|
||||
queryParams: {
|
||||
totalPages: null,
|
||||
totalRecords: null,
|
||||
pageSize: 'pageSize',
|
||||
sortKey: 'sortKey',
|
||||
order: 'sortDir',
|
||||
directions: {
|
||||
'-1': 'asc',
|
||||
'1': 'desc'
|
||||
queryParams: {
|
||||
totalPages : null,
|
||||
totalRecords: null,
|
||||
pageSize : 'pageSize',
|
||||
sortKey : 'sortKey',
|
||||
order : 'sortDir',
|
||||
directions : {
|
||||
'-1': 'asc',
|
||||
'1' : 'desc'
|
||||
}
|
||||
},
|
||||
|
||||
parseState: function (resp) {
|
||||
return {totalRecords: resp.totalRecords};
|
||||
},
|
||||
|
||||
parseRecords: function (resp) {
|
||||
if (resp) {
|
||||
return resp.records;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
},
|
||||
|
||||
parseState: function (resp, queryParams, state) {
|
||||
return {totalRecords: resp.totalRecords};
|
||||
},
|
||||
|
||||
parseRecords: function (resp) {
|
||||
if (resp) {
|
||||
return resp.records;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue