1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 17:57:43 +00:00
Sonarr/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',
'jQuery/RouteBinder'
2013-06-21 05:19:41 +00:00
], 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
});