diff --git a/NzbDrone.Backbone/Content/Images/404.png b/NzbDrone.Backbone/Content/Images/404.png new file mode 100644 index 000000000..2d6af058a Binary files /dev/null and b/NzbDrone.Backbone/Content/Images/404.png differ diff --git a/NzbDrone.Backbone/Controller.js b/NzbDrone.Backbone/Controller.js index 753942d88..3449136f7 100644 --- a/NzbDrone.Backbone/Controller.js +++ b/NzbDrone.Backbone/Controller.js @@ -1,31 +1,29 @@ -define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout','Series/SeriesCollectionView', 'Shared/NotificationView'], function (app, modalRegion) { +define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout', 'Series/SeriesCollectionView', 'Shared/NotificationView', 'Shared/NotFoundView'], function (app, modalRegion) { - var controller = Backbone.Marionette.Controller.extend({ + var controller = Backbone.Marionette.Controller.extend({ addSeries: function (action, query) { - NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout(this, action, query)); this.setTitle('Add Series'); + NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout(this, action, query)); }, series: function (action, query) { - NzbDrone.mainRegion.show(new NzbDrone.Series.SeriesCollectionView(this, action, query)); this.setTitle('NzbDrone'); + NzbDrone.mainRegion.show(new NzbDrone.Series.SeriesCollectionView(this, action, query)); }, notFound: function () { this.setTitle('Not Found'); + NzbDrone.mainRegion.show(new NzbDrone.Shared.NotFoundView(this)); }, - setTitle: function(title) - { + setTitle: function (title) { $('#title-region').html(title); - if(title.toLocaleLowerCase() === 'nzbdrone') - { + if (title.toLocaleLowerCase() === 'nzbdrone') { window.document.title = 'NzbDrone'; } - else - { + else { window.document.title = title + ' - NzbDrone'; } } @@ -34,10 +32,10 @@ NzbDrone.addInitializer(function () { - NzbDrone.addRegions({modalRegion: modalRegion}); + NzbDrone.addRegions({ modalRegion: modalRegion }); NzbDrone.vent.on(NzbDrone.Events.OpenModalDialog, function (options) { - console.log('opening modal dialog ' + options.view.template ); + console.log('opening modal dialog ' + options.view.template); NzbDrone.modalRegion.show(options.view); }); diff --git a/NzbDrone.Backbone/Index.html b/NzbDrone.Backbone/Index.html index 831284245..f139347e9 100644 --- a/NzbDrone.Backbone/Index.html +++ b/NzbDrone.Backbone/Index.html @@ -48,7 +48,6 @@
diff --git a/NzbDrone.Backbone/NzbDrone.Backbone.csproj b/NzbDrone.Backbone/NzbDrone.Backbone.csproj index f1671b9aa..7a7743802 100644 --- a/NzbDrone.Backbone/NzbDrone.Backbone.csproj +++ b/NzbDrone.Backbone/NzbDrone.Backbone.csproj @@ -80,6 +80,7 @@ + @@ -121,6 +122,8 @@ + + diff --git a/NzbDrone.Backbone/Shared/NotFoundTemplate.html b/NzbDrone.Backbone/Shared/NotFoundTemplate.html new file mode 100644 index 000000000..18f6f026e --- /dev/null +++ b/NzbDrone.Backbone/Shared/NotFoundTemplate.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/NzbDrone.Backbone/Shared/NotFoundView.js b/NzbDrone.Backbone/Shared/NotFoundView.js new file mode 100644 index 000000000..370b6c9cf --- /dev/null +++ b/NzbDrone.Backbone/Shared/NotFoundView.js @@ -0,0 +1,7 @@ +define(['app'],function () { + NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({ + template: 'Shared/notfoundtemplate', + }); +}); + +