You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Backbone/app.js

47 lines
902 B

NzbDrone = new Backbone.Marionette.Application();
NzbDrone.Controller = {
AddSeries: function () {
var view = new NzbDrone.AddSeriesView();
NzbDrone.mainRegion.show(view);
},
AddNewSeries: function () {
alert("AddNewSeries");
},
AddExistingSeries: function () {
alert("AddExistingSeries");
}
};
NzbDrone.MyRouter = Backbone.Marionette.AppRouter.extend({
controller: NzbDrone.Controller,
// "someMethod" must exist at controller.someMethod
appRoutes: {
"add": "AddSeries",
"add/new": "AddNewSeries",
"add/existing": "AddExistingSeries",
}
});
NzbDrone.addInitializer(function (options) {
console.log("starting application");
NzbDrone.addRegions({
mainRegion: "#main-region",
});
NzbDrone.Router = new NzbDrone.MyRouter();
Backbone.history.start();
});