added views for all different add methods.

This commit is contained in:
Keivan Beigi 2013-01-18 14:16:24 -08:00 committed by kay.one
parent 85fa96f436
commit 936886f213
3 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,11 @@
NzbDrone.AddSeriesView = Backbone.Marionette.ItemView.extend({
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"
});

View File

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

View File

@ -6,7 +6,13 @@
<body>
<div style="display: none">
<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>