@ -1,70 +1,49 @@
@using NzbDrone.Core.Repository;
@using NzbDrone.Core.Repository;
@using NzbDrone.Web.Models;
@using NzbDrone.Web.Models;
@model IEnumerable<NzbDrone.Core.Repository.Series>
@model IEnumerable<NzbDrone.Core.Repository.Series>
@section TitleContent{
@section TitleContent{
Series
Series
}
}
<style>
<style>
/* progress bar container */
/* progress bar container */
.progressbar
.progressbar
{
{
border:1px solid grey;
border: 1px solid #065EFE;
-khtml-border-radius:8px;
width: 125px;
border-radius:8px;
height: 20px;
-moz-border-radius:8px;
position: relative;
-webkit-border-radius:8px;
color: black;
width:125px;
}
height:20px;
position:relative;
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
{
{
position:absolute;
position: absolute;
width:0;
width: 0;
height:100%;
height: 100%;
overflow:hidden;
overflow: hidden;
background-color:#065EFE;
background-color: #065EFE;
}
}
/* text on bar */
/* text on bar */
.progressbar div.progress .progressText{
.progressbar div.progress .progressText
position:absolute;
{
text-align:center;
position: absolute;
color:white;
text-align: center;
}
color: white;
/* text off bar */
}
.progressbar div.progressText{
/* text off bar */
position:absolute;
.progressbar div.progressText
width:100%;
{
height:100%;
position: absolute;
text-align:center;
width: 100%;
}
height: 100%;
text-align: center;
}
</style>
</style>
@section ActionMenu{
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
@{Html.RenderPartial("SubMenu");}
}
}
@section MainContent{
@section MainContent{
<div class="grid-container">
<div class="grid-container">
@{Html.Telerik().Grid<SeriesModel>().Name("Grid")
@{Html.Telerik().Grid<SeriesModel>().Name("Grid")
@ -76,9 +55,15 @@
.Delete("_DeleteAjaxSeriesEditing", "Series"))
.Delete("_DeleteAjaxSeriesEditing", "Series"))
.Columns(columns =>
.Columns(columns =>
{
{
columns.Command(commands =>
{
commands.Edit().ButtonType(GridButtonType.Image);
commands.Delete().ButtonType(GridButtonType.Image);
}).Title("Actions").Width(80);
columns.Bound(o => o.Title)
columns.Bound(o => o.Title)
.ClientTemplate("<a href=" +
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new {seriesId = "<#= SeriesId #>"}) +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= Title #></a>");
"><#= Title #></a>");
columns.Bound(o => o.SeasonsCount).Title("Seasons");
columns.Bound(o => o.SeasonsCount).Title("Seasons");
columns.Bound(o => o.QualityProfileName).Title("Quality");
columns.Bound(o => o.QualityProfileName).Title("Quality");
@ -91,28 +76,25 @@
"<span class=\"progressText\" style=\"width: 125px;\"></span>" +
"<span class=\"progressText\" style=\"width: 125px;\"></span>" +
"</div>" +
"</div>" +
"</div>");
"</div>");
columns.Bound(o => o.Path);
columns.Command(commands =>
{
commands.Edit().ButtonType(GridButtonType.Image);
commands.Delete().ButtonType(GridButtonType.Image);
}).Title("Actions").Width(80);
})
})
.Editable(editor => editor.Mode(GridEditMode.PopUp))
.Editable(editor => editor.Mode(GridEditMode.PopUp))
.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(true))
.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(true))
.DetailView(detailView => detailView.ClientTemplate("<div style=\"width:95%\"><#= Overview #></div>"))
.DetailView(detailView => detailView.ClientTemplate("<div style=\"width:95%\"><#= Overview #></div>"))
.ClientEvents(clientEvents => { clientEvents.OnEdit("grid_edit");
.ClientEvents(clientEvents =>
{
clientEvents.OnEdit("grid_edit");
clientEvents.OnSave("grid_save");
clientEvents.OnSave("grid_save");
clientEvents.OnDataBinding("grid_bind");
clientEvents.OnDataBinding("grid_bind");
clientEvents.OnDataBound("grid_bound");
clientEvents.OnDataBound("grid_bound");
clientEvents.OnRowDataBound("grid_rowBound");
clientEvents.OnRowDataBound("grid_rowBound");
})
})
.Render();}
.Render();}
<span class="grid-loader"><img src="@Url.Content( "~/Content/Images/Loading.gif" )" alt="Loading"/> Loading...</span>
<span class="grid-loader">
<img src="@Url.Content("~/Content/Images/Loading.gif")" alt="Loading"/>
Loading...</span>
</div>
</div>
}
}
<script type="text/javascript">
<script type="text/javascript">
var windowElement;
var windowElement;
@ -135,7 +117,7 @@
var seasonEditor = e.form.SeasonEditor_collection;
var seasonEditor = e.form.SeasonEditor_collection;
var saveSeasonEditUrl = '@Url.Action("SaveSeason", "Series")';
var saveSeasonEditUrl = '@Url.Action("SaveSeason", "Series")';
jQuery.each(seasonEditor, function() {
jQuery.each(seasonEditor, function () {
var guid = $(this).val();
var guid = $(this).val();
var prefix = '#SeasonEditor_' + guid + '__';
var prefix = '#SeasonEditor_' + guid + '__';
var seriesId = $(prefix + 'SeriesId').val();
var seriesId = $(prefix + 'SeriesId').val();
@ -146,10 +128,10 @@
type: "POST",
type: "POST",
url: saveSeasonEditUrl,
url: saveSeasonEditUrl,
data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber, monitored: monitored }),
data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber, monitored: monitored }),
error: function(req, status, error) {
error: function (req, status, error) {
alert("Sorry! We could save season changes at this time. " + error);
alert("Sorry! We could save season changes at this time. " + error);
},
},
success: function(data, textStatus, jqXHR) { }
success: function (data, textStatus, jqXHR) { }
});
});
});
});
}
}
@ -163,7 +145,6 @@
$("#progressbar_" + seriesId).episodeProgress(episodeFileCount, episodeCount);
$("#progressbar_" + seriesId).episodeProgress(episodeFileCount, episodeCount);
}
}
</script>
</script>
<script type="text/javascript" src="../../Scripts/doTimeout.js"></script>
<script type="text/javascript" src="../../Scripts/doTimeout.js"></script>
<script>
<script>
(function ($) {
(function ($) {
@ -177,17 +158,7 @@
progressBar.css("width", width + "%");
progressBar.css("width", width + "%");
if (width > 97) {
progressBar.css("-khtml-border-top-right-radius", "7px");
progressBar.css("border-top-right-radius", "7px");
progressBar.css("-moz-border-top-right-radius", "7px");
progressBar.css("-webkit-border-top-right-radius", "7px");
progressBar.css("-khtml-border-bottom-right-radius", "7px");
progressBar.css("border-bottom-right-radius", "7px");
progressBar.css("-moz-border-bottom-right-radius", "7px");
progressBar.css("-webkit-border-bottom-right-radius", "7px");
}
div.find(".progressText").html(episodes + " / " + totalEpisodes);
div.find(".progressText").html(episodes + " / " + totalEpisodes);
});
});