mirror of https://github.com/Radarr/Radarr
Series Details updated with overlay when loading.
This commit is contained in:
parent
1015193ef5
commit
1fca5f3e5f
|
@ -577,6 +577,7 @@
|
||||||
<Content Include="Content\Images\Indexers\NzbsOrg.png" />
|
<Content Include="Content\Images\Indexers\NzbsOrg.png" />
|
||||||
<Content Include="Content\Images\Indexers\NzbsRus.png" />
|
<Content Include="Content\Images\Indexers\NzbsRus.png" />
|
||||||
<Content Include="Content\Images\Indexers\Unknown.png" />
|
<Content Include="Content\Images\Indexers\Unknown.png" />
|
||||||
|
<Content Include="Content\Images\Loading.gif" />
|
||||||
<Content Include="Content\Images\Plus.png" />
|
<Content Include="Content\Images\Plus.png" />
|
||||||
<Content Include="Content\Images\spin.gif" />
|
<Content Include="Content\Images\spin.gif" />
|
||||||
<Content Include="Content\Images\ui-bg_diagonals-small_0_aaaaaa_40x40.png" />
|
<Content Include="Content\Images\ui-bg_diagonals-small_0_aaaaaa_40x40.png" />
|
||||||
|
|
|
@ -58,9 +58,9 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<h3>
|
<h3>Season @season.SeasonNumber</h3>
|
||||||
Season @season.SeasonNumber</h3>
|
<div class="grid-container">
|
||||||
Season season1 = season;
|
@{Season season1 = season;
|
||||||
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
||||||
.TableHtmlAttributes(new { @class = "Grid" })
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||||||
.Columns(columns =>
|
.Columns(columns =>
|
||||||
|
@ -78,40 +78,52 @@
|
||||||
columns.Bound(c => c.Quality).Width(10);
|
columns.Bound(c => c.Quality).Width(10);
|
||||||
columns.Bound(c => c.Path);
|
columns.Bound(c => c.Path);
|
||||||
})
|
})
|
||||||
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
|
||||||
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||||||
|
.ClientEvents(clientEvents =>
|
||||||
|
{
|
||||||
|
clientEvents.OnDataBinding("grid_bind");
|
||||||
|
clientEvents.OnDataBound("grid_bound");
|
||||||
|
})
|
||||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
||||||
.Footer(false)
|
.Footer(false)
|
||||||
.DataBinding(
|
.DataBinding(
|
||||||
d =>
|
d =>
|
||||||
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
||||||
new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
||||||
//.EnableCustomBinding(true)
|
|
||||||
//.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
|
|
||||||
.ToolBar(
|
.ToolBar(
|
||||||
c =>
|
c =>
|
||||||
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season1.SeasonId })
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season1.SeasonId })
|
||||||
.ButtonType(GridButtonType.Text))
|
.ButtonType(GridButtonType.Text))
|
||||||
.Render();
|
.Render();}
|
||||||
|
<span class="grid-loader"><img src="@Url.Content("~/Content/Images/Loading.gif")" alt="Loading"/> Loading...</span>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
|
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
|
||||||
@if (specialSeasons != null)
|
@if (specialSeasons != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<h3>
|
<h3>Specials</h3>
|
||||||
Specials</h3>
|
<div class="grid-container">
|
||||||
Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
|
@{Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
|
||||||
.TableHtmlAttributes(new { @class = "Grid" })
|
.TableHtmlAttributes(new {@class = "Grid"})
|
||||||
.Columns(columns =>
|
.Columns(columns =>
|
||||||
{
|
{
|
||||||
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
||||||
columns.Bound(c => c.Title);
|
columns.Bound(c => c.Title);
|
||||||
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
||||||
})
|
})
|
||||||
|
//.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||||||
|
.ClientEvents(clientEvents =>
|
||||||
|
{
|
||||||
|
clientEvents.OnDataBinding("grid_bind");
|
||||||
|
clientEvents.OnDataBound("grid_bound");
|
||||||
|
})
|
||||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
||||||
.Footer(false)
|
.Footer(false)
|
||||||
.Render();
|
.Render(); }
|
||||||
|
<span class="grid-loader"><img src="@Url.Content("~/Content/Images/Loading.gif")" alt="Loading"/> Loading...</span>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@section Scripts{
|
@section Scripts{
|
||||||
|
@ -119,5 +131,13 @@
|
||||||
function episodeDetailExpanded(e) {
|
function episodeDetailExpanded(e) {
|
||||||
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function grid_bind(args) {
|
||||||
|
$('.grid-container').children('.grid-loader').stop().css("top", "0px").fadeIn('slow');
|
||||||
|
}
|
||||||
|
|
||||||
|
function grid_bound(args) {
|
||||||
|
$('.grid-container').children('.grid-loader').stop().fadeOut('slow');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue