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',
|
2013-06-21 06:01:00 +00:00
|
|
|
|
'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
|
|
|
|
});
|
|
|
|
|
|