\ No newline at end of file
diff --git a/UI/AddSeries/New/AddNewSeriesTemplate.html b/UI/AddSeries/New/AddNewSeriesTemplate.html
deleted file mode 100644
index cf2348abc..000000000
--- a/UI/AddSeries/New/AddNewSeriesTemplate.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UI/AddSeries/RootFolders/LayoutTemplate.html b/UI/AddSeries/RootFolders/LayoutTemplate.html
new file mode 100644
index 000000000..1db0790e2
--- /dev/null
+++ b/UI/AddSeries/RootFolders/LayoutTemplate.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UI/AddSeries/RootFolders/RootFolderSelectionTemplate.html b/UI/AddSeries/RootFolders/RootFolderSelectionTemplate.html
new file mode 100644
index 000000000..fa54c561d
--- /dev/null
+++ b/UI/AddSeries/RootFolders/RootFolderSelectionTemplate.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/UI/AddSeries/RootFolders/RootFolderTemplate.html b/UI/AddSeries/RootFolders/RootFolderTemplate.html
deleted file mode 100644
index 8d742d632..000000000
--- a/UI/AddSeries/RootFolders/RootFolderTemplate.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/UI/AddSeries/RootFolders/RootFolderTemplateHelper.js b/UI/AddSeries/RootFolders/RootFolderTemplateHelper.js
new file mode 100644
index 000000000..fba47008f
--- /dev/null
+++ b/UI/AddSeries/RootFolders/RootFolderTemplateHelper.js
@@ -0,0 +1,11 @@
+'use strict';
+
+define(['app', 'AddSeries/RootFolders/RootFolderCollection'], function (app, rootFolders) {
+
+ Handlebars.registerHelper('rootFolderSelection', function () {
+ //TODO: We should be able to pass in the context, either an object or a property
+
+ var templateFunction = Marionette.TemplateCache.get('AddSeries/RootFolders/RootFolderSelectionTemplate');
+ return new Handlebars.SafeString(templateFunction(rootFolders.toJSON()));
+ });
+});
diff --git a/UI/AddSeries/RootFolders/RootFolderView.js b/UI/AddSeries/RootFolders/RootFolderView.js
index 118352c78..0c962222b 100644
--- a/UI/AddSeries/RootFolders/RootFolderView.js
+++ b/UI/AddSeries/RootFolders/RootFolderView.js
@@ -25,9 +25,8 @@ define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Mixins/AutoComplet
className: 'table table-hover'
});
- NzbDrone.AddSeries.RootDirView = Backbone.Marionette.Layout.extend({
- template: 'AddSeries/RootFolders/RootFolderTemplate',
- route : 'series/add/rootdir',
+ NzbDrone.AddSeries.RootFolders.Layout = Backbone.Marionette.Layout.extend({
+ template: 'AddSeries/RootFolders/LayoutTemplate',
ui: {
pathInput: '.x-path input'
@@ -75,8 +74,6 @@ define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Mixins/AutoComplet
console.log(term);
context.collection.fetch({ data: { term: term } });
}
-
-
}
});
diff --git a/UI/AddSeries/SearchResultTemplate.html b/UI/AddSeries/SearchResultTemplate.html
index b5ae95d01..c1bdd32c2 100644
--- a/UI/AddSeries/SearchResultTemplate.html
+++ b/UI/AddSeries/SearchResultTemplate.html
@@ -19,11 +19,7 @@
{{#unless isExisting}}
-
+ {{rootFolderSelection}}
{{/unless}}