From c7c56f5ab8aea04088645fef0b0de18129ef1058 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 6 Feb 2012 14:13:33 -0800 Subject: [PATCH] Grid fixes. Moved grid CSS to Grid.css. --- NzbDrone.Web/Content/Grid.css | 66 +++++++++++++++++++++++- NzbDrone.Web/Content/NzbDrone.css | 59 --------------------- NzbDrone.Web/Scripts/NzbDrone/grid.js | 4 +- NzbDrone.Web/Views/Series/Details.cshtml | 64 +---------------------- NzbDrone.Web/Views/Series/Episode.cshtml | 4 +- NzbDrone.Web/Views/Series/Index.cshtml | 1 + NzbDrone.Web/Views/Series/Series.cshtml | 4 +- 7 files changed, 72 insertions(+), 130 deletions(-) diff --git a/NzbDrone.Web/Content/Grid.css b/NzbDrone.Web/Content/Grid.css index 4f9c4a5d5..9066a459b 100644 --- a/NzbDrone.Web/Content/Grid.css +++ b/NzbDrone.Web/Content/Grid.css @@ -2,15 +2,77 @@ { width: 18px; height: 18px; - padding: 1px; - margin: 2px; + padding: 3px 1px; + margin: 0px; + vertical-align: middle; } .searchImage:hover, .renameImage:hover, .ignoreEpisode:hover, .ignoreEpisodesMaster:hover { background-color: #065EFE; } + +/* Custom Grid */ +.seriesTable +{ + width: 100%; + border-width: 1px; + border-spacing: 2px; + border-style: none; + border-color: white; + border-collapse: collapse; +} + +.seriesTable th +{ + font-family: "Segoe UI Light" , "Open Sans" , "Segoe UI" , sans-serif; + border-width: 300; + font-size: 17px; + padding: 2px; + border-style: none; + border-color: #EEEEEE; + padding-left: 7px; + text-align: left; + background-color: white; + font-weight: lighter; +} + +.seriesTable td +{ + border-width: 1px; + padding: 0px 8px 0px 8px; + border-style: inset; + border-color: #EEEEEE; +} + +.detail-row +{ + display: none; +} +/* Colour alternating rows */ +.seriesTable tr:nth-child(4n) +{ + background: #f0f5ff; +} + +.seriesTable tr:nth-child(4n+1) +{ + background: #f0f5ff; +} + +/* Episode Grid Row Colouring */ +.episodeIgnored +{ + background-color: #F2F5A9; +} + +.episodeMissing +{ + background-color: #F5A9A9; +} + +/* Telerik Grid */ .t-grid td { line-height: 0.6em; diff --git a/NzbDrone.Web/Content/NzbDrone.css b/NzbDrone.Web/Content/NzbDrone.css index 70779afd1..d921daacc 100644 --- a/NzbDrone.Web/Content/NzbDrone.css +++ b/NzbDrone.Web/Content/NzbDrone.css @@ -267,63 +267,4 @@ button span, input[type="button"] span, input[type="submit"] span, input[type="r background: rgb(40, 40, 40); color: rgb(169, 169, 169); padding: 4px; -} - -/* Episode Grid Row Colouring */ -.episodeIgnored -{ - background-color: #F2F5A9; -} - -.episodeMissing -{ - background-color: #F5A9A9; -} - -.seriesTable -{ - width: 100%; - border-width: 1px; - border-spacing: 2px; - border-style: none; - border-color: white; - border-collapse: collapse; -} - -.seriesTable th -{ - font-family: "Segoe UI Light" , "Open Sans" , "Segoe UI" , sans-serif; - border-width: 300; - font-size: 17px; - padding: 2px; - border-style: none; - border-color: #EEEEEE; - padding-left: 7px; - text-align: left; - background-color: white; - font-weight: lighter; -} - -.seriesTable td -{ - border-width: 1px; - padding: 0px 8px 0px 8px; - border-style: inset; - border-color: #EEEEEE; -} - -.detail-view -{ - display: none; -} - -/* Colour alternating rows */ -.seriesTable tr:nth-child(4n) -{ - background: #f0f5ff; -} - -.seriesTable tr:nth-child(4n+1) -{ - background: #f0f5ff; } \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/NzbDrone/grid.js b/NzbDrone.Web/Scripts/NzbDrone/grid.js index 2a20da4e8..f35b200ba 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/grid.js +++ b/NzbDrone.Web/Scripts/NzbDrone/grid.js @@ -6,8 +6,8 @@ $('.seriesTable a').live('click', function (event) { event.stopPropegation(); }); -$('.seriesTable tr td:not(:last-child)').live('click', function () { - $(this).parent('tr').next('.detail-view').toggle(); +$('.seriesTable .data-row td:not(:last-child)').live('click', function () { + $(this).parent('tr').next('.detail-row').toggle(); }); function grid_onError(e) { diff --git a/NzbDrone.Web/Views/Series/Details.cshtml b/NzbDrone.Web/Views/Series/Details.cshtml index 41bd0e4f3..9a864f8cc 100644 --- a/NzbDrone.Web/Views/Series/Details.cshtml +++ b/NzbDrone.Web/Views/Series/Details.cshtml @@ -39,20 +39,6 @@ border-style: none; } - .statusImage, .searchImage, .renameImage, .ignoreEpisode, .ignoreEpisodesMaster - { - width: 18px; - height: 18px; - padding: 3px 1px; - margin: 0px; - vertical-align: middle; - } - - .searchImage:hover, .renameImage:hover, .ignoreEpisode:hover, .ignoreEpisodesMaster:hover - { - background-color: #065EFE; - } - #banner-container { width: 758px; @@ -63,58 +49,11 @@ margin-left: auto; margin-right: auto; } - - .seriesTable - { - width: 100%; - border-width: 1px; - border-spacing: 2px; - border-style: none; - border-color: white; - border-collapse: collapse; - } - - .seriesTable th - { - font-family: "Segoe UI Light" , "Open Sans" , "Segoe UI" , sans-serif; - border-width: 300; - font-size: 17px; - padding: 2px; - border-style: inset; - border-color: #EEEEEE; - padding-left: 7px; - text-align: left; - background-color: white; - font-weight: lighter; - } - - .seriesTable td - { - border-width: 1px; - padding: 0px 8px 0px 8px; - border-style: inset; - border-color: #EEEEEE; - } - - .detail-view - { - display: none; - } - + .seasonSection { margin-top: 50px; } - - /* Colour alternating rows */ - .seriesTable tr:nth-child(4n) - { - background: #f0f5ff; - } - .seriesTable tr:nth-child(4n+1) - { - background: #f0f5ff; - } @section ActionMenu { @@ -157,7 +96,6 @@ } @section Scripts{ @Html.IncludeScript("NzbDrone/seriesDetails.js") - @Html.IncludeScript("NzbDrone/grid.js") diff --git a/NzbDrone.Web/Views/Series/Episode.cshtml b/NzbDrone.Web/Views/Series/Episode.cshtml index 649e36c4f..879fc837c 100644 --- a/NzbDrone.Web/Views/Series/Episode.cshtml +++ b/NzbDrone.Web/Views/Series/Episode.cshtml @@ -1,7 +1,7 @@ @using NzbDrone.Web.Helpers @model NzbDrone.Web.Models.EpisodeModel - + @Model.EpisodeNumber @Model.Title @Model.AirDate @@ -29,7 +29,7 @@ @Ajax.ImageActionLink("../../Content/Images/Rename.png", new { Alt = "Rename", Title = "Rename episode", @class = "renameImage" }, "Rename", "Episode", new { EpisodeFileId = Model.EpisodeFileId }, null, null) - + @Model.Overview
@Model.Path diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index d4fc4e758..f15e51bfd 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -7,6 +7,7 @@ @section HeaderContent { @Html.IncludeCss("Settings.css") + @Html.IncludeCss("Grid.css") }