From 936886f213d32daa89470e60a8dedd68ef471b0d Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 18 Jan 2013 14:16:24 -0800 Subject: [PATCH] added views for all different add methods. --- NzbDrone.Backbone/AddSeries/Views/addSeriesView.js | 8 ++++++++ NzbDrone.Backbone/app.js | 11 ++++------- NzbDrone.Backbone/index.html | 8 +++++++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/NzbDrone.Backbone/AddSeries/Views/addSeriesView.js b/NzbDrone.Backbone/AddSeries/Views/addSeriesView.js index 135953b71..856e15a77 100644 --- a/NzbDrone.Backbone/AddSeries/Views/addSeriesView.js +++ b/NzbDrone.Backbone/AddSeries/Views/addSeriesView.js @@ -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" }); \ No newline at end of file diff --git a/NzbDrone.Backbone/app.js b/NzbDrone.Backbone/app.js index 5d39f9334..2dce47483 100644 --- a/NzbDrone.Backbone/app.js +++ b/NzbDrone.Backbone/app.js @@ -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()); } }; diff --git a/NzbDrone.Backbone/index.html b/NzbDrone.Backbone/index.html index 56ac20fc5..d7c2adcac 100644 --- a/NzbDrone.Backbone/index.html +++ b/NzbDrone.Backbone/index.html @@ -6,7 +6,13 @@
-

Add new series

+

Add

+
+
+

Add Existing

+
+
+

Add New