From b32c539c71f6206131decfd334b0270678809c28 Mon Sep 17 00:00:00 2001 From: markus101 Date: Mon, 7 Feb 2011 23:08:38 -0800 Subject: [PATCH] Quality Settings UI updated some more. --- NzbDrone.Web/Content/Images/Plus.png | Bin 0 -> 473 bytes NzbDrone.Web/Content/Images/X.png | Bin 0 -> 549 bytes NzbDrone.Web/Content/style.css | 9 +- NzbDrone.Web/NzbDrone.Web.csproj | 2 + NzbDrone.Web/Views/Settings/Quality.ascx | 40 ++++--- .../Views/Settings/UserProfileSection.ascx | 102 +++++++++--------- 6 files changed, 81 insertions(+), 72 deletions(-) create mode 100644 NzbDrone.Web/Content/Images/Plus.png create mode 100644 NzbDrone.Web/Content/Images/X.png diff --git a/NzbDrone.Web/Content/Images/Plus.png b/NzbDrone.Web/Content/Images/Plus.png new file mode 100644 index 0000000000000000000000000000000000000000..08485e98f91d82799650d44f1b0f2106f73f187d GIT binary patch literal 473 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh#=yXs;VvL>4nJ9*Y2BMl6Z))r3MTPuM!v-tY$DUi04m= zKk5cF*Wc5{F{I*F(x3nT?U^|kSOl2A*Sr%`NMqzsaGSy5z_9Uy&V!lEOM)4gIs`S& zFtC<7+~E;$C{Q(E5OC07Vqj#s#JbklG})}ga4pUb7BL-p#o_m1`dT8mlGJ4OycjbZ?*s$ z)uIx}vee$WHx(!&wj!(Ku0nydLW6_VbH!R)Cu^*05trFs6v>d(Hr@o8UGj_`8)jK?s(7qv3$j!+y(}w%n;Y&qctmf6*h2o z9NzeoRiR9i-5j1Kk<>Vfq|Jp{FR&K;RU-KfYHF<>FVdQ&MBb@ E04Tqd3jhEB literal 0 HcmV?d00001 diff --git a/NzbDrone.Web/Content/Images/X.png b/NzbDrone.Web/Content/Images/X.png new file mode 100644 index 0000000000000000000000000000000000000000..c0fa6abc1afde2dee6776079b6eb275f67ecac0f GIT binary patch literal 549 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!N$PAn6v9_6_CSO;1OBOz<4YIgc;40b8Z0z zS<)SS9T^xl_SO6joDAeEBzpw;GB8xBGB7kWGcf%852Rl*Fq9fFFuY1&V6d9Oz#yJK zDgLM%(A?RcE{-7;x02?ZK6;daiGlIR5eCM~j7%MjDog?n3is+87?N5}{bd(qU}O=x z$$g~9;SL{ATryMPv8KR#b`AwGg+lfYdxniB4h)S`WZ9EA75=dU74+E&SU2-9a41ZW z^HccC+p)K?LR#QITas7<1Jld@d`EUU)JVSKVpRCY0aX05yHR z=g&A3WHqOq!n5{S`J7878JIdaS4puvb9^~pfk~kuVu6gZf*t>nEQdLaLO`d@D8Afi zA)FO&#H`iPYSkgy@tuK1Ku2%Of``*tj)XVN5byZg_=8Jg?cd#y8 zmdX54T}9fAsnFugT3~>+s04Bz>Ax_im?6@T189QqmFCqAKR5+WJ6=9ozhV#bmB>m1 zUZCzv1$-UO3;zf^oMArl$f1V$XF;+tcCXSRU4uS6sAN5uomss%9m0Rn-^vzxd bMmC0c6=!Dl{}aW4QOe-y>gTe~DWM4fvKy{$ literal 0 HcmV?d00001 diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index d3ca990da..f952f5a7a 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -1,8 +1,7 @@ h1, h2, h3 { margin: 0; - color: #549900; - text-transform: lowercase; + color: #000000; } body @@ -206,13 +205,13 @@ hr input[type="text"] { border: 1px solid #006; - background: #ffc; + background: #CBE8FF; } input[type="text"]:hover { - border: 1px solid #f00; - background: #ff6; + border: 1px solid #065EFE; + background: #C0D6FF; } .button diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index ab85c70b3..e3db921e6 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -107,6 +107,7 @@ + @@ -148,6 +149,7 @@ + diff --git a/NzbDrone.Web/Views/Settings/Quality.ascx b/NzbDrone.Web/Views/Settings/Quality.ascx index c2649ca86..f351ddefc 100644 --- a/NzbDrone.Web/Views/Settings/Quality.ascx +++ b/NzbDrone.Web/Views/Settings/Quality.ascx @@ -66,27 +66,37 @@ Quality <%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %> -
- <%= Html.LabelFor(m => m.DefaultProfileId)%> -
-
- <%: Html.DropDownListFor(m => m.DefaultProfileId, Model.SelectList)%> - <%= Html.ValidationMessageFor(m => m.DefaultProfileId)%> +
+
+ +
+
<%= Html.LabelFor(m => m.DefaultProfileId)%>
+
<%: Html.DropDownListFor(m => m.DefaultProfileId, Model.SelectList)%>
+
<%= Html.ValidationMessageFor(m => m.DefaultProfileId)%>
+
+
-
+
+
+ + +
+ <%foreach (var item in Model.UserProfiles) { %> + <% Html.RenderPartial("UserProfileSection", item); %> + <% } %> +
+
-
- <%= Html.ActionLink("Add a New Profile", "AddUserProfile", null, new { id = "addItem" }) %> -
- <%foreach (var item in Model.UserProfiles) { %> - <% Html.RenderPartial("UserProfileSection", item); %> - <% } %> +
+
-
- <%}%> diff --git a/NzbDrone.Web/Views/Settings/UserProfileSection.ascx b/NzbDrone.Web/Views/Settings/UserProfileSection.ascx index dc9f5ed5a..171573d2a 100644 --- a/NzbDrone.Web/Views/Settings/UserProfileSection.ascx +++ b/NzbDrone.Web/Views/Settings/UserProfileSection.ascx @@ -11,7 +11,7 @@ #sortable1 li { background: #ddd; } #sortable2 li { background: #DAA2A2; } .sortableHeader { margin:2px; margin-left:12px } - #sortable1 li.ui-state-highlight, #sortable2 li.ui-state-highlight { background: #fbf5d0; } + #sortable1 li.ui-state-highlight, #sortable2 li.ui-state-highlight { background: #fbf5d0; border-color: #065EFE; } .removeDiv { float: left; display:block; } @@ -40,69 +40,67 @@
-
- <%----%> +
- <%= Html.TextBoxFor(m => m.AllowedString, new { @id = "allowedString", @style = "display:none" })%> +
+

<%= Html.DisplayTextFor(m => m.Name) %>

+ Delete +
-
+
<%= Html.LabelFor(x => x.Name)%>
<%= Html.TextBoxFor(x => x.Name)%>
<%= Html.ValidationMessageFor(x => x.Name)%>
- -
+
+
+

Allowed

+
    + <% if (Model.Allowed != null) { %> + <%for (int i = 0; i < Model.Allowed.Count(); i++){%> +
  • + <%=Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])%> + <%= Html.DisplayTextFor(c => c.Allowed[i]) %> +
  • + <%}%> + <%}%> +
+
+ +
+

Not-Allowed

+
    + <% var qualitiesList = (List) ViewData["Qualities"]; %> + + <%for (int i = 0; i < qualitiesList.Count(); i++){%> + <% + //Skip Unknown and any item that is in the allowed list + if (qualitiesList[i].ToString() == "Unknown") + continue; + + if (Model.Allowed != null) + { + if (Model.Allowed.Contains(qualitiesList[i])) + continue; + } + %> + +
  • + <%=Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])%> + <%= Html.Label(qualitiesList[i].ToString()) %> + <%--<%= Html.RenderPartial("ProfileAllowedQualities", Model.Allowed[i]) %>--%> +
  • + <% } %> +
+
+
<%= Html.TextBoxFor(x => x.ProfileId, new { @style = "display:none" })%> <%= Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" })%> + <%= Html.TextBoxFor(m => m.AllowedString, new { @id = "allowedString", @style = "display:none" })%>
- -
- -
-

Allowed

-
    - <% if (Model.Allowed != null) { %> - <%for (int i = 0; i < Model.Allowed.Count(); i++){%> -
  • - <%=Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])%> - <%= Html.DisplayTextFor(c => c.Allowed[i]) %> -
  • - <%}%> - <%}%> -
-
- -
-

Not-Allowed

-
    - <% var qualitiesList = (List) ViewData["Qualities"]; %> - - <%for (int i = 0; i < qualitiesList.Count(); i++){%> - <% - //Skip Unknown and any item that is in the allowed list - if (qualitiesList[i].ToString() == "Unknown") - continue; - - if (Model.Allowed != null) - { - if (Model.Allowed.Contains(qualitiesList[i])) - continue; - } - %> - -
  • - <%=Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])%> - <%= Html.Label(qualitiesList[i].ToString()) %> - <%--<%= Html.RenderPartial("ProfileAllowedQualities", Model.Allowed[i]) %>--%> -
  • - - <% } %> -
-
-