1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-04 06:38:28 +02:00
Sonarr/UI/Routing.js

35 lines
1.2 KiB
JavaScript
Raw Normal View History

"use strict";
2013-06-18 03:49:48 +03:00
require(['app', 'Controller', 'RouteBinder', 'Shared/Footer/View'], function (App, Controller, RouteBinder, FooterView) {
NzbDrone.Router = Backbone.Marionette.AppRouter.extend({
2013-06-18 03:49:48 +03: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',
2013-05-03 09:53:32 +03:00
'history' : 'history',
2013-06-05 03:49:53 +03:00
'logs' : 'logs',
'rss' : 'rss',
':whatever' : 'notFound'
}
});
NzbDrone.addInitializer(function () {
NzbDrone.Router = new NzbDrone.Router();
2013-02-18 06:04:28 +03:00
Backbone.history.start({ pushState: true });
2013-06-18 03:49:48 +03:00
RouteBinder.bind();
NzbDrone.footerRegion.show(new FooterView());
});
});