sonarr-repo-only/NzbDrone.Backbone/Routing.js

28 lines
751 B
JavaScript
Raw Normal View History

2013-02-15 23:38:53 +00:00
require(['app','Controller'], function (app, controller) {
NzbDrone.Router = Backbone.Marionette.AppRouter.extend({
2013-02-15 23:38:53 +00:00
controller: controller,
appRoutes: {
'': 'series',
'series': 'series',
'series/index': 'series',
'series/add': 'addSeries',
'series/add/:action(/:query)': 'addSeries',
2013-03-02 19:13:23 +00:00
'series/details/:query': 'seriesDetails',
2013-02-20 07:45:52 +00:00
'upcoming': 'upcoming',
'upcoming/index': 'upcoming',
'calendar': 'calendar',
':whatever': 'notFound'
}
});
NzbDrone.addInitializer(function () {
NzbDrone.Router = new NzbDrone.Router();
2013-02-18 03:04:28 +00:00
Backbone.history.start({ pushState: true });
});
});