Renamed EpisodeSorting to Naming (to Match UI).

Fixed EpisodeNaming CSS (Floats are now contained properly).
Renamed CodeFile1 to FooterModel.
This commit is contained in:
Mark McDowall 2011-11-28 17:11:55 -08:00
parent 7af6977cab
commit 041ad20bb3
6 changed files with 25 additions and 19 deletions

View File

@ -197,9 +197,9 @@ namespace NzbDrone.Web.Controllers
return View(model); return View(model);
} }
public ActionResult EpisodeSorting() public ActionResult Naming()
{ {
var model = new EpisodeSortingModel(); var model = new EpisodeNamingModel();
model.SeriesName = _configProvider.SortingIncludeSeriesName; model.SeriesName = _configProvider.SortingIncludeSeriesName;
model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle; model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle;
@ -559,7 +559,7 @@ namespace NzbDrone.Web.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult SaveEpisodeSorting(EpisodeSortingModel data) public JsonResult SaveNaming(EpisodeNamingModel data)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {

View File

@ -4,7 +4,7 @@ using System.Web.Mvc;
namespace NzbDrone.Web.Models namespace NzbDrone.Web.Models
{ {
public class EpisodeSortingModel public class EpisodeNamingModel
{ {
[DisplayName("Series Name")] [DisplayName("Series Name")]
[Description("Should filenames contain the series name when renamed?")] [Description("Should filenames contain the series name when renamed?")]

View File

@ -221,7 +221,7 @@
<Compile Include="Helpers\DescriptionExtension.cs" /> <Compile Include="Helpers\DescriptionExtension.cs" />
<Compile Include="Helpers\HtmlPrefixScopeExtensions.cs" /> <Compile Include="Helpers\HtmlPrefixScopeExtensions.cs" />
<Compile Include="Helpers\IsCurrentActionHelper.cs" /> <Compile Include="Helpers\IsCurrentActionHelper.cs" />
<Compile Include="Models\CodeFile1.cs" /> <Compile Include="Models\FooterModel.cs" />
<Compile Include="Models\ExistingSeriesModel.cs" /> <Compile Include="Models\ExistingSeriesModel.cs" />
<Compile Include="Models\AddNewSeriesModel.cs" /> <Compile Include="Models\AddNewSeriesModel.cs" />
<Compile Include="Models\JobQueueItemModel.cs" /> <Compile Include="Models\JobQueueItemModel.cs" />
@ -231,7 +231,7 @@
<Compile Include="Models\QualityTypeModel.cs" /> <Compile Include="Models\QualityTypeModel.cs" />
<Compile Include="Models\RootDirModel.cs" /> <Compile Include="Models\RootDirModel.cs" />
<Compile Include="Models\SabnzbdSettingsModel.cs" /> <Compile Include="Models\SabnzbdSettingsModel.cs" />
<Compile Include="Models\EpisodeSortingModel.cs" /> <Compile Include="Models\EpisodeNamingModel.cs" />
<Compile Include="Models\HistoryModel.cs" /> <Compile Include="Models\HistoryModel.cs" />
<Compile Include="Models\IndexerSettingsModel.cs" /> <Compile Include="Models\IndexerSettingsModel.cs" />
<Compile Include="Models\MappingModel.cs" /> <Compile Include="Models\MappingModel.cs" />
@ -408,7 +408,7 @@
<Content Include="Views\Settings\Indexers.cshtml" /> <Content Include="Views\Settings\Indexers.cshtml" />
<Content Include="Views\System\Jobs.cshtml" /> <Content Include="Views\System\Jobs.cshtml" />
<Content Include="Views\Settings\Sabnzbd.cshtml" /> <Content Include="Views\Settings\Sabnzbd.cshtml" />
<Content Include="Views\Settings\EpisodeSorting.cshtml" /> <Content Include="Views\Settings\Naming.cshtml" />
<Content Include="Views\Settings\Notifications.cshtml" /> <Content Include="Views\Settings\Notifications.cshtml" />
<Content Include="Views\Settings\Quality.cshtml" /> <Content Include="Views\Settings\Quality.cshtml" />
<Content Include="Views\AddSeries\RootDir.cshtml" /> <Content Include="Views\AddSeries\RootDir.cshtml" />

View File

@ -1,5 +1,5 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.EpisodeSortingModel @model NzbDrone.Web.Models.EpisodeNamingModel
@section HeaderContent{ @section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" /> <link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
@ -7,10 +7,15 @@
<style> <style>
#examples #examples
{ {
margin-top: 25px; margin-top: 5px;
margin-bottom: 15px; margin-bottom: 20px;
padding-left: 20px; padding-left: 20px;
} }
.settingsContainer
{
overflow: auto;
}
</style> </style>
} }
@ -24,8 +29,9 @@
@section MainContent{ @section MainContent{
<div id="stylized"> <div id="stylized">
@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" }))
{ {
<div class="settingsContainer">
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") @Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.SeriesName) <label class="labelClass">@Html.LabelFor(m => m.SeriesName)
<span class="small">@Html.DescriptionFor(m => m.SeriesName)</span> <span class="small">@Html.DescriptionFor(m => m.SeriesName)</span>
@ -71,10 +77,10 @@
<span class="small">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</span> <span class="small">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</span>
</label> </label>
@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" }) @Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" })
</div>
<div id ="examples"> <div id ="examples">
<div id="singleEpisodeExample"></div> <div id="singleEpisodeExample"><b>Single Episode Example: </b><span class="result"></span></div>
<div id="multiEpisodeExample"></div> <div id="multiEpisodeExample"><b>Multi-Episode Example: </b><span class="result"></span></div>
</div> </div>
<button type="submit" id="save_button" disabled="disabled">Save</button> <button type="submit" id="save_button" disabled="disabled">Save</button>
@ -129,9 +135,9 @@
if ($('#ReplaceSpaces').attr('checked')) if ($('#ReplaceSpaces').attr('checked'))
result = result.replace(/\s/g, '.'); result = result.replace(/\s/g, '.');
result = '<b>Single Episode Example: </b>' + result; //result = '<b>Single Episode Example: </b>' + result;
$('#singleEpisodeExample').html(result); $('#singleEpisodeExample').children('.result').text(result);
} }
function createMultiEpisodeExample() { function createMultiEpisodeExample() {
@ -194,9 +200,9 @@
if ($('#ReplaceSpaces').attr('checked')) if ($('#ReplaceSpaces').attr('checked'))
result = result.replace(/\s/g, '.'); result = result.replace(/\s/g, '.');
result = '<b>Multi-Episode Example: </b>' + result; //result = '<b>Multi-Episode Example: </b>' + result;
$('#multiEpisodeExample').html(result); $('#multiEpisodeExample').children('.result').text(result);
} }
</script> </script>
} }

View File

@ -1,6 +1,6 @@
<ul class="sub-menu"> <ul class="sub-menu">
<li>@Html.ActionLink("Quality", "Quality", "Settings")</li> <li>@Html.ActionLink("Quality", "Quality", "Settings")</li>
<li>@Html.ActionLink("Naming", "EpisodeSorting", "Settings")</li> <li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
<li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li> <li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li>
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li> <li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li> <li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li>