mirror of
https://github.com/lidarr/Lidarr
synced 2025-03-15 00:08:53 +00:00
EpisodeGrid sorting is done in the controller instead of the View, because it actually works...
This commit is contained in:
parent
ceec420035
commit
b9e9bb06a4
2 changed files with 2 additions and 8 deletions
|
@ -93,7 +93,7 @@ namespace NzbDrone.Web.Controllers
|
|||
{
|
||||
using (MiniProfiler.StepStatic("Controller"))
|
||||
{
|
||||
var episodes = GetEpisodeModels(_episodeProvider.GetEpisodesBySeason(seriesId, seasonNumber));
|
||||
var episodes = GetEpisodeModels(_episodeProvider.GetEpisodesBySeason(seriesId, seasonNumber)).OrderByDescending(e => e.EpisodeNumber);
|
||||
return View(new GridModel(episodes));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,18 +126,12 @@
|
|||
.Width(80);
|
||||
})
|
||||
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
||||
//.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
||||
.Footer(true)
|
||||
.DataBinding(
|
||||
d =>
|
||||
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
||||
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } }))
|
||||
@*.ToolBar(toolbar => toolbar.Template(@<text>
|
||||
<ul class="sub-menu">
|
||||
<li><a href="../Episode/SearchSeason?seriesId=@seriesId&seasonNumber=@season" onclick="searchSeason('@seriesId', @season); return false;">Search for Season</a></li>
|
||||
<li><a href="../Episode/RenameSeason?seriesId=@seriesId&seasonNumber=@season" onclick="renameSeason('@seriesId', @season); return false;">Rename Season</a></li>
|
||||
</ul>
|
||||
</text>))*@
|
||||
.ClientEvents(clientEvents =>
|
||||
{
|
||||
clientEvents.OnRowDataBound("grid_rowBound");
|
||||
|
|
Loading…
Add table
Reference in a new issue