added not found view with tumbeasts

pull/3113/head
kay.one 12 years ago
parent 6c944758ed
commit da96095432

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

@ -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);
});

@ -48,7 +48,6 @@
</div>
<div id="logo" class="row">
<div id="title-region" class="span18 offset2">
NzbDrone
</div>
</div>
<div id="content" class="row">

@ -80,6 +80,7 @@
<Content Include="Content\Images\logo.png" />
<Content Include="Content\Images\logo_small.png" />
<Content Include="Content\Images\spinner.gif" />
<Content Include="Content\Images\404.png" />
<Content Include="Content\Images\thetvdb.png" />
<Content Include="Content\Intelisense\bootstrap.css" />
<Content Include="Content\Menu.css" />
@ -121,6 +122,8 @@
<Content Include="Series\SeriesItemView.js" />
<Content Include="Series\SeriesModel.js" />
<Content Include="Shared\AutoComplete.js" />
<Content Include="Shared\NotFoundTemplate.html" />
<Content Include="Shared\NotFoundView.js" />
<Content Include="Shared\ModalRegion.js" />
<Content Include="Shared\NotificationCollection.js" />
<Content Include="Shared\NotificationModel.js" />

@ -0,0 +1,3 @@
<div>
<img src="/static/content/images/404.png" style="height:400px; margin-top: 50px" />
</div>

@ -0,0 +1,7 @@
define(['app'],function () {
NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({
template: 'Shared/notfoundtemplate',
});
});
Loading…
Cancel
Save