added views for all different add methods.

pull/23/head
Keivan Beigi 12 years ago committed by kay.one
parent 85fa96f436
commit 936886f213

@ -1,3 +1,11 @@
NzbDrone.AddSeriesView = Backbone.Marionette.ItemView.extend({ NzbDrone.AddSeriesView = Backbone.Marionette.ItemView.extend({
template: "#add-series-template" template: "#add-series-template"
}); });
NzbDrone.AddNewSeriesView = Backbone.Marionette.ItemView.extend({
template: "#add-new-series-template"
});
NzbDrone.AddExistingSeriesView = Backbone.Marionette.ItemView.extend({
template: "#add-existing-series-template"
});

@ -3,18 +3,15 @@
NzbDrone.Controller = { NzbDrone.Controller = {
AddSeries: function () { AddSeries: function () {
NzbDrone.mainRegion.show(new NzbDrone.AddSeriesView());
var view = new NzbDrone.AddSeriesView();
NzbDrone.mainRegion.show(view);
}, },
AddNewSeries: function () { AddNewSeries: function () {
alert("AddNewSeries"); NzbDrone.mainRegion.show(new NzbDrone.AddNewSeriesView());
}, },
AddExistingSeries: function () { AddExistingSeries: function () {
alert("AddExistingSeries"); NzbDrone.mainRegion.show(new NzbDrone.AddExistingSeriesView());
} }
}; };

@ -6,7 +6,13 @@
<body> <body>
<div style="display: none"> <div style="display: none">
<div id="add-series-template"> <div id="add-series-template">
<h1>Add new series</h1> <h1>Add</h1>
</div>
<div id="add-existing-series-template">
<h1>Add Existing</h1>
</div>
<div id="add-new-series-template">
<h1>Add New</h1>
</div> </div>
</div> </div>

Loading…
Cancel
Save