From a6a5277de843c023f8b8731a03cc477954ce6596 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 5 Dec 2012 08:34:43 -0800 Subject: [PATCH] Stylized the new profiles --- .gitignore | 1 + .../QualityProfiles/QualityProfileService.cs | 22 +++---- NzbDrone.Web/Content/QualitySettings.css | 60 ++++++------------ .../FakesAssemblies/Ninject.Web.Mvc.Fakes.dll | Bin 91136 -> 91136 bytes .../Scripts/backbone/views/qualityProfiles.js | 18 +++++- NzbDrone.Web/Views/Settings/Quality.cshtml | 21 +++--- 6 files changed, 59 insertions(+), 63 deletions(-) diff --git a/.gitignore b/.gitignore index 26929ed7a..d938c5a70 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ _ReSharper*/ [Ll]ogs/ [Aa]pp_Data/ /[Pp]ackage/ +/FakesAssemblies/ #NZBDrone specific *.db *Web.Publish.xml diff --git a/NzbDrone.Api/QualityProfiles/QualityProfileService.cs b/NzbDrone.Api/QualityProfiles/QualityProfileService.cs index c21f40ad2..abaeffc7d 100644 --- a/NzbDrone.Api/QualityProfiles/QualityProfileService.cs +++ b/NzbDrone.Api/QualityProfiles/QualityProfileService.cs @@ -36,29 +36,29 @@ namespace NzbDrone.Api.QualityProfiles return Mapper.Map(profile); } - public override object OnPost(QualityProfileModel data) + //Create + public override object OnPost(QualityProfileModel request) { - //Create - var profile = Mapper.Map(data); + var profile = Mapper.Map(request); _qualityProvider.Add(profile); - return data; + return request; } - public override object OnPut(QualityProfileModel data) + //Update + public override object OnPut(QualityProfileModel request) { - //Update - var profile = Mapper.Map(data); + var profile = Mapper.Map(request); _qualityProvider.Update(profile); - return data; + return request; } - public override object OnDelete(QualityProfileModel data) + public override object OnDelete(QualityProfileModel request) { - _qualityProvider.Delete(data.Id); + _qualityProvider.Delete(request.Id); - return "ok"; + return request.Id.ToString(); } } } \ No newline at end of file diff --git a/NzbDrone.Web/Content/QualitySettings.css b/NzbDrone.Web/Content/QualitySettings.css index 740fb0081..1fe456a0a 100644 --- a/NzbDrone.Web/Content/QualitySettings.css +++ b/NzbDrone.Web/Content/QualitySettings.css @@ -38,8 +38,7 @@ } /* QualityProfileItem */ -.quality-selectee -{ +.quality-selectee { border-color: #065EFE; border-style: solid; border-width: 1px; @@ -51,73 +50,50 @@ float: left; cursor: default; } -.quality-selecting -{ +.quality-selecting { background: #85AEF9; } -.quality-selected -{ + +.quality-selected { background: #065EFE; color: white; } -.profileSection -{ +.quality-profile { float: left; - width: 265px; + width: 260px; margin: 2px; border:solid 1px #CCCCCD; display: inline-block; overflow: hidden; padding: 5px 5px 5px 5px; + position: relative; } - -.profileOptions label -{ - margin-top: 10px; - margin-left: 7px; - margin-right: 20px; - font-weight: bold; + +.quality-profile-setting label { + width: 45px; display: inline-block; - width: 40px; -} - -.profileOptions input, .profileOptions select -{ - font-size:12px; - padding:4px 2px; - border:solid 1px #aacfe4; - width:170px; - margin-right: 2px; } -.profileOptions input -{ +.quality-profile-setting input { margin-left: 10px; - margin-bottom: 2px; + width: 160px; } -.profileOptions select -{ - width: 176px; - margin-bottom: 7px; +.quality-profile-setting select { + width: 166px; } -.qualitySelector -{ - padding-left: 5px; -} - -.delete-profile { +.remove-profile { position: absolute; top: 0px; - right: 0px; - font-size: 16px; + right: 4px; + font-size: 20px; color: #000000; text-decoration: none; } -.delete-profile > i[class*="icon-"]:hover { +.remove-profile > i[class*="icon-"]:hover { cursor: pointer !important; } diff --git a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll index 8c7ba3d3afb3ee25dbff6fc6e1e4dac993f93de9..51fc2b09cb1cec97fb102b5aade5d2a0ae1af84c 100644 GIT binary patch delta 199 zcmV;&0671E$OVAN1(1jXhpN7ji%kNh9kJSX0e_+Gc>$3Ufd2rkIyPIJunxBu8U!^y z-OqKbmO^Aw_NMbYth{ek_J(r90l=}F_ zs)Nu1x6lFsP#F+ft#NPVaL`S)f#A2omSn59FdPBoJ_CoUzLytU0Vx3jw?SJ0zX-_B BU!nj2 delta 199 zcmV;&0671E$OVAN1(1jXSY5r5i%kO34zb#I0e@5oxaomVp12*#^K-4bfqMl!8p)jA zQ4WCNa47Z?mn+@{jzb$^Ob@0Bz3gsLZvb_~9 zPJ_?_x6lFsP#F;F2;EF!pz%(u -
- Name + +
+
-
- Cutoff +
+ + class="quality-selectee" + type="checkbox" + value="<%= quality.Allowed %>" + data-quality-id="<%= quality.Id %>" + <%= quality.Allowed ? 'checked="checked"' : '' %> /> <% }); %> + +