From 9cf77955d0811d2ada810399a8076e93e45c0e89 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 3 Aug 2011 23:59:08 -0700 Subject: [PATCH] Removed broken season editor from Series/Index editor. Cleaned up series editor UI, with descriptions. --- NzbDrone.Web/Models/SeriesModel.cs | 4 ++ NzbDrone.Web/NzbDrone.Web.csproj | 3 -- .../Series/EditorTemplates/SeriesModel.cshtml | 46 +++++++++---------- NzbDrone.Web/Views/Series/Index.cshtml | 29 +----------- NzbDrone.Web/Views/Series/SeasonEditor.cshtml | 36 --------------- 5 files changed, 28 insertions(+), 90 deletions(-) delete mode 100644 NzbDrone.Web/Views/Series/SeasonEditor.cshtml diff --git a/NzbDrone.Web/Models/SeriesModel.cs b/NzbDrone.Web/Models/SeriesModel.cs index 7a2429acb..be1111df2 100644 --- a/NzbDrone.Web/Models/SeriesModel.cs +++ b/NzbDrone.Web/Models/SeriesModel.cs @@ -26,16 +26,20 @@ namespace NzbDrone.Web.Models //View & Edit [DisplayName("Path")] + [Description("Where should NzbDrone store episodes for this series?")] public string Path { get; set; } [DisplayName("Quality Profile")] + [Description("Which Quality Profile should NzbDrone use to download episodes?")] public virtual int QualityProfileId { get; set; } //Editing Only [DisplayName("Use Season Folder")] + [Description("Should downloaded episodes be stored in season folders?")] public bool SeasonFolder { get; set; } [DisplayName("Monitored")] + [Description("Should NzbDrone download episodes for this series?")] public bool Monitored { get; set; } [DisplayName("Season Editor")] diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index e204fe659..f7ad632b0 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -320,9 +320,6 @@ - - - diff --git a/NzbDrone.Web/Views/Series/EditorTemplates/SeriesModel.cshtml b/NzbDrone.Web/Views/Series/EditorTemplates/SeriesModel.cshtml index 66426ce84..8beff06af 100644 --- a/NzbDrone.Web/Views/Series/EditorTemplates/SeriesModel.cshtml +++ b/NzbDrone.Web/Views/Series/EditorTemplates/SeriesModel.cshtml @@ -5,31 +5,29 @@ Layout = null; } -
- @Html.HiddenFor(m => m.SeriesId) - - @Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" }) - - @Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" }) - - @Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" }) - -
-
- @Html.LabelFor(m => m.SeasonEditor) - - -
-
-
+ + +
+
+ @Html.HiddenFor(m => m.SeriesId) + + @Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" }) + + @Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" }) + + @Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" }) + + @Html.TextBoxFor(m => m.Path, new { @class = "inputClass" })
- \ No newline at end of file diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 380e19584..82a08a942 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -4,6 +4,7 @@ @section TitleContent{ NZBDrone } + + @section ActionMenu{ @{Html.RenderPartial("SubMenu");} } @@ -103,37 +105,10 @@ NZBDrone .closest(".t-window") .data("tWindow") .center(); - - var seriesId = args.dataItem.SeriesId; - var url = '@Url.Action("SeasonEditor", "Series")'; - $('#season-editor').load(url, { seriesId: seriesId }, function (response, status, xhr) { - $('#seasonEditorLoader').hide(); - }); } function grid_save(e) { $('#ajaxSaveWheel').show(); - - var seasonEditor = e.form.SeasonEditor_collection; - var saveSeasonEditUrl = '@Url.Action("SaveSeason", "Series")'; - - jQuery.each(seasonEditor, function () { - var guid = $(this).val(); - var prefix = '#SeasonEditor_' + guid + '__'; - var seriesId = $(prefix + 'SeriesId').val(); - var seasonNumber = $(prefix + 'SeasonNumber').val(); - var monitored = $(prefix + 'Monitored').attr('checked'); - - $.ajax({ - type: "POST", - url: saveSeasonEditUrl, - data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber, monitored: monitored }), - error: function (req, status, error) { - alert("Sorry! We could save season changes at this time. " + error); - }, - success: function (data, textStatus, jqXHR) { } - }); - }); } function grid_rowBound(e) { diff --git a/NzbDrone.Web/Views/Series/SeasonEditor.cshtml b/NzbDrone.Web/Views/Series/SeasonEditor.cshtml deleted file mode 100644 index 3aad85958..000000000 --- a/NzbDrone.Web/Views/Series/SeasonEditor.cshtml +++ /dev/null @@ -1,36 +0,0 @@ -@using NzbDrone.Web.Models; -@model List -@{ - Layout = null; -} -
- @foreach (var season in Model) - { - Html.RenderAction("GetSingleSeasonView", "Series", season); - } -
-@section Scripts{ - -}