2013-01-18 22:05:38 +00:00
|
|
|
|
NzbDrone = new Backbone.Marionette.Application();
|
|
|
|
|
|
2013-01-18 22:05:52 +00:00
|
|
|
|
NzbDrone.Controller = {
|
|
|
|
|
|
|
|
|
|
AddSeries: function () {
|
2013-01-18 22:16:24 +00:00
|
|
|
|
NzbDrone.mainRegion.show(new NzbDrone.AddSeriesView());
|
2013-01-18 22:05:52 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
AddNewSeries: function () {
|
2013-01-18 22:16:24 +00:00
|
|
|
|
NzbDrone.mainRegion.show(new NzbDrone.AddNewSeriesView());
|
2013-01-18 22:05:52 +00:00
|
|
|
|
},
|
2013-01-18 22:16:24 +00:00
|
|
|
|
|
2013-01-18 22:05:52 +00:00
|
|
|
|
AddExistingSeries: function () {
|
2013-01-18 22:16:24 +00:00
|
|
|
|
NzbDrone.mainRegion.show(new NzbDrone.AddExistingSeriesView());
|
2013-01-18 22:05:52 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2013-01-18 22:05:38 +00:00
|
|
|
|
NzbDrone.MyRouter = Backbone.Marionette.AppRouter.extend({
|
|
|
|
|
|
2013-01-18 22:05:52 +00:00
|
|
|
|
controller: NzbDrone.Controller,
|
2013-01-18 22:05:38 +00:00
|
|
|
|
// "someMethod" must exist at controller.someMethod
|
|
|
|
|
appRoutes: {
|
|
|
|
|
"add": "AddSeries",
|
|
|
|
|
"add/new": "AddNewSeries",
|
|
|
|
|
"add/existing": "AddExistingSeries",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
NzbDrone.addInitializer(function (options) {
|
2013-01-18 22:05:52 +00:00
|
|
|
|
|
|
|
|
|
console.log("starting application");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NzbDrone.addRegions({
|
|
|
|
|
mainRegion: "#main-region",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
NzbDrone.Router = new NzbDrone.MyRouter();
|
2013-01-18 22:05:38 +00:00
|
|
|
|
Backbone.history.start();
|
2013-01-18 22:05:52 +00:00
|
|
|
|
|
|
|
|
|
|
2013-01-18 22:05:38 +00:00
|
|
|
|
});
|