Lidarr/UI/Routing.js

35 lines
1.2 KiB
JavaScript
Raw Normal View History

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