mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
UI Cleanup - Updated System, Tags and Wanted subtrees.
This commit is contained in:
@@ -5,43 +5,59 @@ var AsFilteredCollection = require('../../Mixins/AsFilteredCollection');
|
||||
var AsSortedCollection = require('../../Mixins/AsSortedCollection');
|
||||
var AsPersistedStateCollection = require('../../Mixins/AsPersistedStateCollection');
|
||||
|
||||
module.exports = (function(){
|
||||
var Collection = PagableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/wanted/cutoff',
|
||||
model : EpisodeModel,
|
||||
tableName : 'wanted.cutoff',
|
||||
state : {
|
||||
pageSize : 15,
|
||||
sortKey : 'airDateUtc',
|
||||
order : 1
|
||||
},
|
||||
queryParams : {
|
||||
totalPages : null,
|
||||
totalRecords : null,
|
||||
pageSize : 'pageSize',
|
||||
sortKey : 'sortKey',
|
||||
order : 'sortDir',
|
||||
directions : {
|
||||
"-1" : 'asc',
|
||||
"1" : 'desc'
|
||||
}
|
||||
},
|
||||
filterModes : {
|
||||
"monitored" : ['monitored', 'true'],
|
||||
"unmonitored" : ['monitored', 'false']
|
||||
},
|
||||
sortMappings : {"series" : {sortKey : 'series.sortTitle'}},
|
||||
parseState : function(resp){
|
||||
return {totalRecords : resp.totalRecords};
|
||||
},
|
||||
parseRecords : function(resp){
|
||||
if(resp) {
|
||||
return resp.records;
|
||||
}
|
||||
return resp;
|
||||
var Collection = PagableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/wanted/cutoff',
|
||||
model : EpisodeModel,
|
||||
tableName : 'wanted.cutoff',
|
||||
|
||||
state : {
|
||||
pageSize : 15,
|
||||
sortKey : 'airDateUtc',
|
||||
order : 1
|
||||
},
|
||||
|
||||
queryParams : {
|
||||
totalPages : null,
|
||||
totalRecords : null,
|
||||
pageSize : 'pageSize',
|
||||
sortKey : 'sortKey',
|
||||
order : 'sortDir',
|
||||
directions : {
|
||||
'-1' : 'asc',
|
||||
'1' : 'desc'
|
||||
}
|
||||
});
|
||||
Collection = AsFilteredCollection.call(Collection);
|
||||
Collection = AsSortedCollection.call(Collection);
|
||||
return AsPersistedStateCollection.call(Collection);
|
||||
}).call(this);
|
||||
},
|
||||
|
||||
// Filter Modes
|
||||
filterModes : {
|
||||
'monitored' : [
|
||||
'monitored',
|
||||
'true'
|
||||
],
|
||||
'unmonitored' : [
|
||||
'monitored',
|
||||
'false'
|
||||
],
|
||||
},
|
||||
|
||||
sortMappings : {
|
||||
'series' : { sortKey : 'series.sortTitle' }
|
||||
},
|
||||
|
||||
parseState : function(resp) {
|
||||
return { totalRecords : resp.totalRecords };
|
||||
},
|
||||
|
||||
parseRecords : function(resp) {
|
||||
if (resp) {
|
||||
return resp.records;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
});
|
||||
|
||||
Collection = AsFilteredCollection.call(Collection);
|
||||
Collection = AsSortedCollection.call(Collection);
|
||||
|
||||
module.exports = AsPersistedStateCollection.call(Collection);
|
Reference in New Issue
Block a user