Adding "master" dropbox for changing quality for add series.

pull/6/head
Mark McDowall 14 years ago
parent a30a62f824
commit 0330bb1577

@ -63,6 +63,12 @@ namespace NzbDrone.Web.Controllers
{
var unmappedList = new List<String>();
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));

@ -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 });
}
%>
<script type="text/javascript">
$("#masterDropboxId").change(function () {
var selectedQuality = $('#masterDropboxId').get(0).selectedIndex;
//$(".qualityDropbox").data("tComboBox").value(selectedQuality);
//$(".qualityDropbox").data("tDropDownList").val(selectedQuality);
var comboBox = $(".qualityDropbox").data("tDropDownList");
comboBox.select(selectedQuality);
});
</script>
</asp:Content>

@ -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" })
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
Add</button>
</div>

Loading…
Cancel
Save