Moved episodeSearch to it's own javascript file.

pull/4/head
Mark McDowall 14 years ago
parent 0284f54e08
commit 9ee74d68eb

@ -672,6 +672,7 @@
<Content Include="Scripts\2011.1.315\telerik.treeview.min.js" />
<Content Include="Scripts\2011.1.315\telerik.upload.min.js" />
<Content Include="Scripts\2011.1.315\telerik.window.min.js" />
<Content Include="Scripts\episodeSearch.js" />
<Content Include="Scripts\gridLoad.js" />
<Content Include="Scripts\jquery-1.6.1-vsdoc.js" />
<Content Include="Scripts\jquery-1.6.1.js" />

@ -0,0 +1,13 @@
var searchUrl = '../Episode/Search';
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);
}
});
}

@ -140,18 +140,5 @@
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>
}

@ -51,6 +51,7 @@
.Add("jquery-tgc-countdown-1.0.js")
.Add("MicrosoftAjax.js")
.Add("MicrosoftMvcValidation.js")
.Add("gridLoad.js"))
.Add("gridLoad.js")
.Add("episodeSearch.js"))
.Render();}
</html>

Loading…
Cancel
Save