1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 16:32:56 +01:00
Sonarr/UI/Router.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

2013-06-21 03:43:58 +02:00
"use strict";
require(
[
2013-06-21 07:19:41 +02:00
'app',
2013-06-21 03:43:58 +02:00
'marionette',
2013-06-21 07:19:41 +02:00
'Controller',
'RouteBinder'
], function (App, Marionette, Controller, RouterBinder) {
2013-06-21 03:43:58 +02:00
2013-06-21 07:19:41 +02:00
NzbDrone.Router = Marionette.AppRouter.extend({
2013-06-21 03:43:58 +02:00
controller: Controller,
appRoutes : {
'' : 'series',
'series' : 'series',
'series/index' : 'series',
'series/add' : 'addSeries',
'series/add/:action(/:query)': 'addSeries',
'series/details/:query' : 'seriesDetails',
'calendar' : 'calendar',
'settings' : 'settings',
'settings/:action(/:query)' : 'settings',
'missing' : 'missing',
'history' : 'history',
'logs' : 'logs',
'rss' : 'rss',
':whatever' : 'notFound'
}
});
2013-06-21 07:19:41 +02:00
NzbDrone.addInitializer(function () {
NzbDrone.Router = new NzbDrone.Router();
Backbone.history.start({ pushState: true });
RouterBinder.bind(NzbDrone.Router);
// NzbDrone.footerRegion.show(new FooterView());
});
return NzbDrone.Router;
2013-06-21 03:43:58 +02:00
});