1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 16:02:29 +01:00
Sonarr/NzbDrone.Web/_backboneApp/Controller.js

39 lines
1021 B
JavaScript
Raw Normal View History

2013-02-16 00:38:53 +01:00
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();
});