1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-27 10:19:41 +00:00
Radarr/UI/Router.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

2013-06-21 01:43:58 +00:00
"use strict";
require(
[
2013-06-21 05:19:41 +00:00
'app',
2013-06-21 01:43:58 +00:00
'marionette',
2013-06-21 05:19:41 +00:00
'Controller',
'RouteBinder'
], function (App, Marionette, Controller, RouterBinder) {
2013-06-21 01:43:58 +00:00
2013-06-21 05:19:41 +00:00
NzbDrone.Router = Marionette.AppRouter.extend({
2013-06-21 01:43:58 +00: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 05:19:41 +00: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 01:43:58 +00:00
});