diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 4e8b063a0..415298dcb 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -49,13 +49,6 @@ namespace NzbDrone.Web.Controllers return View(); } - public ActionResult Bt() - { - - return View(); - } - - public ActionResult AddNew() { ViewData["RootDirs"] = _rootFolderProvider.GetAll().Select(c => c.Path).OrderBy(e => e).ToList(); @@ -103,7 +96,7 @@ namespace NzbDrone.Web.Controllers result.ExistingSeries.Add(new Tuple(folder, title, seriesId)); } - catch(Exception ex) + catch (Exception ex) { logger.WarnException("Failed to connect to TheTVDB to search for: " + foldername, ex); return View(); @@ -120,8 +113,8 @@ namespace NzbDrone.Web.Controllers [JsonErrorFilter] public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId, string startDate) { - if (string.IsNullOrWhiteSpace(path) || String.Equals(path,"null",StringComparison.InvariantCultureIgnoreCase)) - return JsonNotificationResult.Error("Couldn't add " + seriesName, "You need a valid root folder"); + if (string.IsNullOrWhiteSpace(path) || String.Equals(path, "null", StringComparison.InvariantCultureIgnoreCase)) + return JsonNotificationResult.Error("Couldn't add " + seriesName, "You need a valid root folder"); path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName)); @@ -140,11 +133,11 @@ namespace NzbDrone.Web.Controllers return JsonNotificationResult.Error("Add Existing series failed.", "Invalid Series information"); DateTime? date = null; - + if (!String.IsNullOrWhiteSpace(startDate)) date = DateTime.Parse(startDate, null, DateTimeStyles.RoundtripKind); - _seriesProvider.AddSeries(seriesName,path, seriesId, qualityProfileId, date); + _seriesProvider.AddSeries(seriesName, path, seriesId, qualityProfileId, date); _jobProvider.QueueJob(typeof(ImportNewSeriesJob)); return JsonNotificationResult.Info(seriesName, "Was added successfully"); @@ -170,18 +163,18 @@ namespace NzbDrone.Web.Controllers return Json(tvDbResults, JsonRequestBehavior.AllowGet); } - catch(TvdbNotAvailableException ex) + catch (TvdbNotAvailableException ex) { logger.WarnException("Unable to lookup series on TheTVDB", ex); return JsonNotificationResult.Info("Lookup Failed", "TheTVDB is not available at this time."); } - catch(Exception ex) + catch (Exception ex) { logger.WarnException("Unknown Error when looking up series on TheTVDB", ex); return JsonNotificationResult.Info("Lookup Failed", "Unknown error while connecting to TheTVDB"); } - + } public ActionResult RootList() diff --git a/NzbDrone.Web/Views/AddSeries/bt.cshtml b/NzbDrone.Web/Views/AddSeries/bt.cshtml deleted file mode 100644 index 3c38b0750..000000000 --- a/NzbDrone.Web/Views/AddSeries/bt.cshtml +++ /dev/null @@ -1,56 +0,0 @@ -@using Cassette.Stylesheets -@{ - ViewBag.Title = "Add Series"; - Layout = "~/Views/Shared/_Bootstrap.cshtml"; - Bundles.Reference("AddSeries\\Views\\"); -} - - - -
- -
-
- -
-
Import existing.
-
Manage root folders
-
-
-@* - -@section Templates -{ - -} -
-

Add Existing

-

Single Series

-

All of my series

-
- - -
-

Add New

-
- -
-
- - -
-

single -

-
- -
-

multiple

-
-*@ diff --git a/NzbDrone.Web/Views/Shared/_Bootstrap.cshtml b/NzbDrone.Web/Views/Shared/_Bootstrap.cshtml deleted file mode 100644 index 9f48c4d2d..000000000 --- a/NzbDrone.Web/Views/Shared/_Bootstrap.cshtml +++ /dev/null @@ -1,78 +0,0 @@ -@using Cassette.Scripts -@using Cassette.Stylesheets -@using NzbDrone.Web -@using NzbDrone.Web.Backbone.NzbDrone -@using NzbDrone.Web.Helpers -@{ - Bundles.Reference(CassetteBundleConfiguration.BASE_STYLE); - Bundles.Reference(CassetteBundleConfiguration.BACKBONE); -} - - - - - @ViewBag.Title - NzbDrone - - - - - - - - - - - - - @Bundles.RenderStylesheets() - - - @RenderBody() -
- - -
-
- -
-
-
-
-
- -
- - @Bundles.RenderScripts() - - - - - - diff --git a/NzbDrone.Web/Views/System/Index.cshtml b/NzbDrone.Web/Views/System/Index.cshtml index ae362a5da..e2cd2ef49 100644 --- a/NzbDrone.Web/Views/System/Index.cshtml +++ b/NzbDrone.Web/Views/System/Index.cshtml @@ -1,7 +1,6 @@ @using NzbDrone.Web.Helpers @{ ViewBag.Title = "System"; - Layout = "~/Views/Shared/_Bootstrap.cshtml"; } diff --git a/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js b/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js index fcfafb4b2..cf6c38841 100644 --- a/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js +++ b/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js @@ -2,10 +2,13 @@ loadTemplate: function (templateId) { + var template; + console.log("Loading template '" + templateId + "'"); + jQuery.ajax({ - url: 'Backbone.NzbDrone//' + templateId + '.html', + url: '_backboneApp//' + templateId + '.html', async: false }).done(function (data) {