From 041ad20bb3594f82a79ee99f7a9d8f3bdd63a1ea Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 28 Nov 2011 17:11:55 -0800 Subject: [PATCH] Renamed EpisodeSorting to Naming (to Match UI). Fixed EpisodeNaming CSS (Floats are now contained properly). Renamed CodeFile1 to FooterModel. --- .../Controllers/SettingsController.cs | 6 ++-- ...eSortingModel.cs => EpisodeNamingModel.cs} | 2 +- .../Models/{CodeFile1.cs => FooterModel.cs} | 0 NzbDrone.Web/NzbDrone.Web.csproj | 6 ++-- .../{EpisodeSorting.cshtml => Naming.cshtml} | 28 +++++++++++-------- NzbDrone.Web/Views/Settings/SubMenu.cshtml | 2 +- 6 files changed, 25 insertions(+), 19 deletions(-) rename NzbDrone.Web/Models/{EpisodeSortingModel.cs => EpisodeNamingModel.cs} (98%) rename NzbDrone.Web/Models/{CodeFile1.cs => FooterModel.cs} (100%) rename NzbDrone.Web/Views/Settings/{EpisodeSorting.cshtml => Naming.cshtml} (88%) diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 956abc48c..8a19305b6 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -197,9 +197,9 @@ namespace NzbDrone.Web.Controllers return View(model); } - public ActionResult EpisodeSorting() + public ActionResult Naming() { - var model = new EpisodeSortingModel(); + var model = new EpisodeNamingModel(); model.SeriesName = _configProvider.SortingIncludeSeriesName; model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle; @@ -559,7 +559,7 @@ namespace NzbDrone.Web.Controllers } [HttpPost] - public JsonResult SaveEpisodeSorting(EpisodeSortingModel data) + public JsonResult SaveNaming(EpisodeNamingModel data) { if (ModelState.IsValid) { diff --git a/NzbDrone.Web/Models/EpisodeSortingModel.cs b/NzbDrone.Web/Models/EpisodeNamingModel.cs similarity index 98% rename from NzbDrone.Web/Models/EpisodeSortingModel.cs rename to NzbDrone.Web/Models/EpisodeNamingModel.cs index 0f21794c2..1c9f40bbe 100644 --- a/NzbDrone.Web/Models/EpisodeSortingModel.cs +++ b/NzbDrone.Web/Models/EpisodeNamingModel.cs @@ -4,7 +4,7 @@ using System.Web.Mvc; namespace NzbDrone.Web.Models { - public class EpisodeSortingModel + public class EpisodeNamingModel { [DisplayName("Series Name")] [Description("Should filenames contain the series name when renamed?")] diff --git a/NzbDrone.Web/Models/CodeFile1.cs b/NzbDrone.Web/Models/FooterModel.cs similarity index 100% rename from NzbDrone.Web/Models/CodeFile1.cs rename to NzbDrone.Web/Models/FooterModel.cs diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 466fdcddb..19e049898 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -221,7 +221,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -408,7 +408,7 @@ - + diff --git a/NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml b/NzbDrone.Web/Views/Settings/Naming.cshtml similarity index 88% rename from NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml rename to NzbDrone.Web/Views/Settings/Naming.cshtml index bcb95299a..b9ac80acd 100644 --- a/NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml +++ b/NzbDrone.Web/Views/Settings/Naming.cshtml @@ -1,5 +1,5 @@ @using NzbDrone.Web.Helpers -@model NzbDrone.Web.Models.EpisodeSortingModel +@model NzbDrone.Web.Models.EpisodeNamingModel @section HeaderContent{ @@ -7,10 +7,15 @@ } @@ -24,8 +29,9 @@ @section MainContent{
- @using (Html.BeginForm("SaveEpisodeSorting", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) + @using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) { +
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") @Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" }) - +
-
-
+
Single Episode Example:
+
Multi-Episode Example:
@@ -129,9 +135,9 @@ if ($('#ReplaceSpaces').attr('checked')) result = result.replace(/\s/g, '.'); - result = 'Single Episode Example: ' + result; + //result = 'Single Episode Example: ' + result; - $('#singleEpisodeExample').html(result); + $('#singleEpisodeExample').children('.result').text(result); } function createMultiEpisodeExample() { @@ -194,9 +200,9 @@ if ($('#ReplaceSpaces').attr('checked')) result = result.replace(/\s/g, '.'); - result = 'Multi-Episode Example: ' + result; + //result = 'Multi-Episode Example: ' + result; - $('#multiEpisodeExample').html(result); + $('#multiEpisodeExample').children('.result').text(result); } } diff --git a/NzbDrone.Web/Views/Settings/SubMenu.cshtml b/NzbDrone.Web/Views/Settings/SubMenu.cshtml index 48ffe01ac..f55d5bb49 100644 --- a/NzbDrone.Web/Views/Settings/SubMenu.cshtml +++ b/NzbDrone.Web/Views/Settings/SubMenu.cshtml @@ -1,6 +1,6 @@