mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-31 16:02:29 +01:00
39 lines
1021 B
JavaScript
39 lines
1021 B
JavaScript
|
define(['app', 'AddSeries/AddSeriesLayout','Series/SeriesCollectionView'], function () {
|
|||
|
|
|||
|
var controller = Backbone.Marionette.Controller.extend({
|
|||
|
|
|||
|
addSeries: function (action, query) {
|
|||
|
NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout(this, action, query));
|
|||
|
this.setTitle('Add Series');
|
|||
|
},
|
|||
|
|
|||
|
series: function (action, query) {
|
|||
|
NzbDrone.mainRegion.show(new NzbDrone.Series.SeriesCollectionView(this, action, query));
|
|||
|
this.setTitle('NzbDrone');
|
|||
|
|
|||
|
},
|
|||
|
|
|||
|
notFound: function () {
|
|||
|
this.setTitle('Not Found');
|
|||
|
},
|
|||
|
|
|||
|
setTitle: function(title)
|
|||
|
{
|
|||
|
$('#title-region').html(title);
|
|||
|
|
|||
|
if(title.toLocaleLowerCase() === 'nzbdrone')
|
|||
|
{
|
|||
|
window.document.title = 'NzbDrone';
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
window.document.title = title + ' - NzbDrone';
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
return new controller();
|
|||
|
|
|||
|
});
|
|||
|
|