From 7a16a907a48661397b535f9198add8e7107eae02 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 3 Apr 2011 18:31:27 -0700 Subject: [PATCH] fixed some css issues. added quality to each add existing item --- NzbDrone.Web/Content/style.css | 22 ++++++++-- .../Controllers/AddSeriesController.cs | 17 ++++---- NzbDrone.Web/Views/AddSeries/AddExisting.aspx | 1 - .../Views/AddSeries/AddSeriesItem.cshtml | 43 +++++++++---------- 4 files changed, 47 insertions(+), 36 deletions(-) diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index b02e2c9e8..1e0e80e92 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -8,12 +8,19 @@ body { padding: 0; background: #191919 url(images/img07.jpg) no-repeat right top; - font-family: "Segoe UI" , Tahoma, Geneva, sans-serif; + font-family: "Segoe UI" , "Segoe UI Light" , Tahoma, Geneva, sans-serif; font-size: 13px; color: #3C3C3C; background-attachment: fixed; } +fieldset +{ + border-style: solid; + border-color: #065EFE; + border-width: 1px; +} + h1 { font-size: 52px; @@ -138,7 +145,8 @@ hr #logo { - font-family: Segoe UI Light, Tahoma, Geneva, sans-serif; + font-family: "Segoe UI Light" , "Segoe UI" , Tahoma, Geneva, sans-serif; + font-weight: 100; height: 135px; background: url(images/img03.jpg) no-repeat left top; font-size: 90px; @@ -161,6 +169,11 @@ hr border-color: #EEEEEE; } +.t-combobox, .t-dropdown +{ + vertical-align: middle; +} + /* Footer */ .timer { @@ -216,7 +229,7 @@ hr -input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button +button, input[type="button"], input[type="submit"], input[type="reset"] { color: white; background-color: #065EFE; @@ -228,7 +241,8 @@ input[type="button"], input[type="submit"], input[type="reset"], input[type="fil .listButton { - padding: 1px 10px 2px 10px; + padding: 2px 10px 2px 10px; + vertical-align: middle; margin: 0px; } diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 298ab2e71..b82656232 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -60,13 +60,6 @@ namespace NzbDrone.Web.Controllers public ActionResult AddExisting() { - var defaultQuality = _configProvider.DefaultQualityProfile; - var profiles = _qualityProvider.GetAllProfiles(); - var selectList = new SelectList(profiles, "QualityProfileId", "Name"); - - ViewData["QualityProfileId"] = defaultQuality; - ViewData["QualitySelectList"] = selectList; - var unmappedList = new List(); foreach (var folder in _rootFolderProvider.GetAll()) @@ -85,6 +78,14 @@ namespace NzbDrone.Web.Controllers ViewData["guid"] = Guid.NewGuid(); ViewData["path"] = path; ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^'); + + var qualityProfiles = _qualityProvider.GetAllProfiles(); + ViewData["quality"] = new SelectList( + qualityProfiles, + "QualityProfileId", + "Name", + "HD"); + return PartialView("AddSeriesItem", suggestions); } @@ -111,7 +112,7 @@ namespace NzbDrone.Web.Controllers Data = suggestions }; } - + public SelectList GetSuggestionList(string searchString) { var dataVal = _tvDbProvider.SearchSeries(searchString); diff --git a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx b/NzbDrone.Web/Views/AddSeries/AddExisting.aspx index cdd4c5754..fab8a8da8 100644 --- a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx +++ b/NzbDrone.Web/Views/AddSeries/AddExisting.aspx @@ -6,7 +6,6 @@ Add Existing Series - <%: Html.DropDownList("qualityProfileId", (SelectList)ViewData["QualitySelectList"], ViewData["QualityProfileId"])%> <% foreach (var path in Model) { diff --git a/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml b/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml index 37f2b0845..7fd70a03c 100644 --- a/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml +++ b/NzbDrone.Web/Views/AddSeries/AddSeriesItem.cshtml @@ -1,34 +1,31 @@ -@model SelectList -
-
- @ViewData["path"].ToString() -
-
- @(Html.Telerik().ComboBox() - .Name(ViewData["guid"].ToString()) - // .AutoFill(true) +@using NzbDrone.Core.Repository.Quality +@model SelectList +
+
+ @ViewData["path"].ToString() +
+ @{Html.Telerik().ComboBox() + .Name("seriesList_" + ViewData["guid"].ToString()) .BindTo(Model) - // .DataBinding(b => b.Ajax().Select("TvDbLookup", "AddSeries")) - .DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400).Cache(false)) - + .DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400).Cache(false)) .Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains)) .HighlightFirstMatch(true) - .HtmlAttributes(new { style = "width:70%; align:right" }) - .SelectedIndex(0)) - -
+ .HtmlAttributes(new { style = "width: 300px;" }) + .SelectedIndex(0).Render();} + @Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px;" }) + +
+