mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 01:01:34 +02:00
Oh hai search!
This commit is contained in:
@@ -78,6 +78,8 @@
|
||||
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
||||
columns.Bound(c => c.Quality).Width(0);
|
||||
columns.Bound(c => c.Status).Width(0);
|
||||
columns.Bound(o => o.EpisodeId).Title("")
|
||||
.ClientTemplate("<a href='#Search' onClick=\"return searchForEpisode('<#= EpisodeId #>')\" >Search</a>");
|
||||
})
|
||||
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||||
.ClientEvents(clientEvents =>
|
||||
@@ -150,5 +152,18 @@
|
||||
function episodeDetailExpanded(e) {
|
||||
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
||||
}
|
||||
|
||||
var searchUrl = '@Url.Action("Search", "Episode")';
|
||||
|
||||
function searchForEpisode(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: searchUrl,
|
||||
data: jQuery.param({ episodeId: id }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could search for " + id + " at this time. " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
Reference in New Issue
Block a user