mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-24 22:55:21 -04:00
UI Cleanup - Updated Series subtree.
This commit is contained in:
@@ -6,24 +6,28 @@ var SeriesDetailsLayout = require('./Details/SeriesDetailsLayout');
|
||||
|
||||
module.exports = NzbDroneController.extend({
|
||||
_originalInit : NzbDroneController.prototype.initialize,
|
||||
initialize : function(){
|
||||
|
||||
initialize : function() {
|
||||
this.route('', this.series);
|
||||
this.route('series', this.series);
|
||||
this.route('series/:query', this.seriesDetails);
|
||||
|
||||
this._originalInit.apply(this, arguments);
|
||||
},
|
||||
series : function(){
|
||||
|
||||
series : function() {
|
||||
this.setTitle('Sonarr');
|
||||
this.showMainRegion(new SeriesIndexLayout());
|
||||
},
|
||||
seriesDetails : function(query){
|
||||
var series = SeriesCollection.where({titleSlug : query});
|
||||
if(series.length !== 0) {
|
||||
|
||||
seriesDetails : function(query) {
|
||||
var series = SeriesCollection.where({ titleSlug : query });
|
||||
|
||||
if (series.length !== 0) {
|
||||
var targetSeries = series[0];
|
||||
this.setTitle(targetSeries.get('title'));
|
||||
this.showMainRegion(new SeriesDetailsLayout({model : targetSeries}));
|
||||
}
|
||||
else {
|
||||
this.showMainRegion(new SeriesDetailsLayout({ model : targetSeries }));
|
||||
} else {
|
||||
this.showNotFound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user