mirror of
https://github.com/lidarr/Lidarr
synced 2025-03-03 18:15:37 +00:00
Ajax load series/index
This commit is contained in:
parent
253d0919e0
commit
ebad87b81b
2 changed files with 11 additions and 8 deletions
|
@ -39,10 +39,15 @@ public SeriesController(SeriesProvider seriesProvider,
|
||||||
|
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount());
|
return View();
|
||||||
var serialized = new JavaScriptSerializer().Serialize(series);
|
}
|
||||||
|
|
||||||
return View((object)serialized);
|
[HttpGet]
|
||||||
|
public ActionResult Series()
|
||||||
|
{
|
||||||
|
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount());
|
||||||
|
|
||||||
|
return Json(new { aaData = series }, JsonRequestBehavior.AllowGet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult Edit(int seriesId)
|
public ActionResult Edit(int seriesId)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using NzbDrone.Web.Helpers
|
@using NzbDrone.Web.Helpers
|
||||||
@model string
|
|
||||||
@{ViewBag.Title = "NzbDrone";}
|
@{ViewBag.Title = "NzbDrone";}
|
||||||
|
|
||||||
@section HeaderContent
|
@section HeaderContent
|
||||||
|
@ -76,9 +75,7 @@
|
||||||
<th style="width: 100px">Episodes</th>
|
<th style="width: 100px">Episodes</th>
|
||||||
|
|
||||||
@*Commands Column*@
|
@*Commands Column*@
|
||||||
<th style="width: 80px">
|
<th style="width: 80px"></th>
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -111,8 +108,9 @@
|
||||||
$('#seriesGrid').removeClass('hidden-grid');
|
$('#seriesGrid').removeClass('hidden-grid');
|
||||||
|
|
||||||
oTable = $('.dataTablesGrid').dataTable({
|
oTable = $('.dataTablesGrid').dataTable({
|
||||||
|
"sAjaxSource": "Series/Series",
|
||||||
|
"bServerSide": false,
|
||||||
"bShowAll": false,
|
"bShowAll": false,
|
||||||
"aaData": @Html.Raw(Model),
|
|
||||||
"bPaginate": false,
|
"bPaginate": false,
|
||||||
"bLengthChange": false,
|
"bLengthChange": false,
|
||||||
"bFilter": false,
|
"bFilter": false,
|
||||||
|
|
Loading…
Reference in a new issue