mirror of https://github.com/Radarr/Radarr
Episode progress on Grid is now rounded.
This commit is contained in:
parent
b77a91b7f7
commit
681353de3c
|
@ -237,7 +237,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
|
|
||||||
foreach (var s in seriesInDb)
|
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
|
series.Add(new SeriesModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -633,6 +633,7 @@
|
||||||
<Content Include="Content\Images\ui-icons_888888_256x240.png" />
|
<Content Include="Content\Images\ui-icons_888888_256x240.png" />
|
||||||
<Content Include="Content\Images\ui-icons_cd0a0a_256x240.png" />
|
<Content Include="Content\Images\ui-icons_cd0a0a_256x240.png" />
|
||||||
<Content Include="Content\Images\ui-icons_ffffff_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\Images\X.png" />
|
||||||
<Content Include="Content\jquery-simpledropdown.css" />
|
<Content Include="Content\jquery-simpledropdown.css" />
|
||||||
<Content Include="Content\jquery-ui-1.8.8.custom.css" />
|
<Content Include="Content\jquery-ui-1.8.8.custom.css" />
|
||||||
|
|
|
@ -13,9 +13,21 @@
|
||||||
function () {
|
function () {
|
||||||
var div = $(this);
|
var div = $(this);
|
||||||
var innerdiv = div.find(".progress");
|
var innerdiv = div.find(".progress");
|
||||||
|
|
||||||
var width = Math.round(episodes / totalEpisodes * 100);
|
var width = Math.round(episodes / totalEpisodes * 100);
|
||||||
innerdiv.css("width", width + "%");
|
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);
|
div.find(".progressText").html(episodes + " / " + totalEpisodes);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -28,11 +40,30 @@
|
||||||
.progressbar
|
.progressbar
|
||||||
{
|
{
|
||||||
border:1px solid grey;
|
border:1px solid grey;
|
||||||
|
-khtml-border-radius:8px;
|
||||||
|
border-radius:8px;
|
||||||
|
-moz-border-radius:8px;
|
||||||
|
-webkit-border-radius:8px;
|
||||||
width:125px;
|
width:125px;
|
||||||
height:20px;
|
height:20px;
|
||||||
position:relative;
|
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 */
|
/* color bar */
|
||||||
.progressbar div.progress
|
.progressbar div.progress
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,19 @@
|
||||||
|
|
||||||
var width = Math.round(episodes / totalEpisodes * 100);
|
var width = Math.round(episodes / totalEpisodes * 100);
|
||||||
innerdiv.css("width", width + "%");
|
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);
|
div.find(".progressText").html(episodes + " / " + totalEpisodes);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -19,7 +32,6 @@
|
||||||
/* progress bar container */
|
/* progress bar container */
|
||||||
.progressbar
|
.progressbar
|
||||||
{
|
{
|
||||||
z-index: 1;
|
|
||||||
border:1px solid grey;
|
border:1px solid grey;
|
||||||
-khtml-border-radius:8px;
|
-khtml-border-radius:8px;
|
||||||
border-radius:8px;
|
border-radius:8px;
|
||||||
|
@ -28,12 +40,21 @@
|
||||||
width:125px;
|
width:125px;
|
||||||
height:20px;
|
height:20px;
|
||||||
position:relative;
|
position:relative;
|
||||||
color:black;
|
color:black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* apply curves to the progress bar */
|
||||||
.progress
|
.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 */
|
/* color bar */
|
||||||
|
@ -68,5 +89,5 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$("#progressbar").episodeProgress(100, 200);
|
$("#progressbar").episodeProgress(100, 100);
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue