Renamed EpisodeSorting to Naming (to Match UI).

Fixed EpisodeNaming CSS (Floats are now contained properly).
Renamed CodeFile1 to FooterModel.
pull/2/head
Mark McDowall 13 years ago
parent 7af6977cab
commit 041ad20bb3

@ -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)
{

@ -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?")]

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

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

@ -1,6 +1,6 @@
<ul class="sub-menu">
<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("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li>

Loading…
Cancel
Save