Episode progress on Grid is now rounded.

This commit is contained in:
Mark McDowall 2011-06-01 21:40:06 -07:00
parent b77a91b7f7
commit 681353de3c
4 changed files with 60 additions and 7 deletions

View File

@ -237,7 +237,7 @@ namespace NzbDrone.Web.Controllers
foreach (var s in seriesInDb)
{
var episodesTotal = s.Episodes;
var episodesTotal = s.Episodes.Where(e => e.AirDate <= DateTime.Today && e.AirDate > new DateTime(1899, 12, 31));
series.Add(new SeriesModel
{

View File

@ -633,6 +633,7 @@
<Content Include="Content\Images\ui-icons_888888_256x240.png" />
<Content Include="Content\Images\ui-icons_cd0a0a_256x240.png" />
<Content Include="Content\Images\ui-icons_ffffff_256x240.png" />
<Content Include="Content\Images\VideoFolder.png" />
<Content Include="Content\Images\X.png" />
<Content Include="Content\jquery-simpledropdown.css" />
<Content Include="Content\jquery-ui-1.8.8.custom.css" />

View File

@ -13,9 +13,21 @@
function () {
var div = $(this);
var innerdiv = div.find(".progress");
var width = Math.round(episodes / totalEpisodes * 100);
innerdiv.css("width", width + "%");
if (width > 97) {
innerdiv.css("-khtml-border-top-right-radius", "7px");
innerdiv.css("border-top-right-radius", "7px");
innerdiv.css("-moz-border-top-right-radius", "7px");
innerdiv.css("-webkit-border-top-right-radius", "7px");
innerdiv.css("-khtml-border-bottom-right-radius", "7px");
innerdiv.css("border-bottom-right-radius", "7px");
innerdiv.css("-moz-border-bottom-right-radius", "7px");
innerdiv.css("-webkit-border-bottom-right-radius", "7px");
}
div.find(".progressText").html(episodes + " / " + totalEpisodes);
}
);
@ -28,11 +40,30 @@
.progressbar
{
border:1px solid grey;
-khtml-border-radius:8px;
border-radius:8px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
width:125px;
height:20px;
position:relative;
color:black;
color:black;
}
/* apply curves to the progress bar */
.progress
{
-khtml-border-top-left-radius:7px;
border-top-left-radius:7px;
-moz-border-top-left-radius:7px;
-webkit-border-top-left-radius:7px;
-khtml-border-bottom-left-radius:7px;
border-bottom-left-radius:7px;
-moz-border-bottom-left-radius:7px;
-webkit-border-bottom-left-radius:7px;
}
/* color bar */
.progressbar div.progress
{

View File

@ -8,6 +8,19 @@
var width = Math.round(episodes / totalEpisodes * 100);
innerdiv.css("width", width + "%");
if (width > 97) {
innerdiv.css("-khtml-border-top-right-radius", "7px");
innerdiv.css("border-top-right-radius", "7px");
innerdiv.css("-moz-border-top-right-radius", "7px");
innerdiv.css("-webkit-border-top-right-radius", "7px");
innerdiv.css("-khtml-border-bottom-right-radius", "7px");
innerdiv.css("border-bottom-right-radius", "7px");
innerdiv.css("-moz-border-bottom-right-radius", "7px");
innerdiv.css("-webkit-border-bottom-right-radius", "7px");
}
div.find(".progressText").html(episodes + " / " + totalEpisodes);
}
);
@ -19,7 +32,6 @@
/* progress bar container */
.progressbar
{
z-index: 1;
border:1px solid grey;
-khtml-border-radius:8px;
border-radius:8px;
@ -28,12 +40,21 @@
width:125px;
height:20px;
position:relative;
color:black;
color:black;
}
/* apply curves to the progress bar */
.progress
{
z-index: 5;
-khtml-border-top-left-radius:7px;
border-top-left-radius:7px;
-moz-border-top-left-radius:7px;
-webkit-border-top-left-radius:7px;
-khtml-border-bottom-left-radius:7px;
border-bottom-left-radius:7px;
-moz-border-bottom-left-radius:7px;
-webkit-border-bottom-left-radius:7px;
}
/* color bar */
@ -68,5 +89,5 @@
</div>
<script>
$("#progressbar").episodeProgress(100, 200);
$("#progressbar").episodeProgress(100, 100);
</script>