From 0330bb157725119d48e0a0bb78b0ae74c7be2c58 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Apr 2011 16:49:18 -0700 Subject: [PATCH] Adding "master" dropbox for changing quality for add series. --- .../Controllers/AddSeriesController.cs | 6 +++++ NzbDrone.Web/Views/AddSeries/AddExisting.aspx | 27 ++++++++++++++++++- .../Views/AddSeries/AddSeriesItem.cshtml | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index d20e2ef26..3c95633f9 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -63,6 +63,12 @@ public ActionResult AddExisting() { var unmappedList = new List(); + var profiles = _qualityProvider.GetAllProfiles(); + var defaultQuality = Convert.ToInt32(_configProvider.DefaultQualityProfile); + var selectList = new SelectList(profiles, "QualityProfileId", "Name", defaultQuality); + + ViewData["qualities"] = selectList; + foreach (var folder in _rootFolderProvider.GetAll()) { unmappedList.AddRange(_syncProvider.GetUnmappedFolders(folder.Path)); diff --git a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx b/NzbDrone.Web/Views/AddSeries/AddExisting.aspx index de3aa9c21..cd6972573 100644 --- a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx +++ b/NzbDrone.Web/Views/AddSeries/AddExisting.aspx @@ -9,11 +9,36 @@ <% if (Model.Count() == 0) Html.DisplayText("No Series to Add"); + %> + + <%: Html.DropDownList("masterDropbox", (SelectList)ViewData["qualities"], new { style = "width: 100px;", id = "masterDropboxId" })%> + + <%: @Html.Telerik().DropDownList().Name("tester").BindTo((SelectList)ViewData["qualities"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })%> + + + <% foreach (var path in Model) { Html.RenderAction("RenderPartial", "AddSeries", new { path }); } %> - + + + + \ No newline at end of file diff --git a/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml b/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml index 09458c69f..5bc21ce8c 100644 --- a/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml +++ b/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml @@ -12,7 +12,7 @@ .HighlightFirstMatch(true) .HtmlAttributes(new { style = "width: 300px;" }) .Render();} - @Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px;" }) + @Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })