1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-10 04:52:42 +01:00

Undeleted localSearch and deleted episodeSearch - sleep is required apparently.

This commit is contained in:
Mark McDowall 2011-12-15 23:18:54 -08:00
parent af328c9e55
commit a7baac9747
4 changed files with 43 additions and 14 deletions

View File

@ -384,7 +384,7 @@
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" /> <Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="Scripts\NzbDrone\addSeries.js" /> <Content Include="Scripts\NzbDrone\addSeries.js" />
<Content Include="Scripts\NzbDrone\AutoComplete.js" /> <Content Include="Scripts\NzbDrone\AutoComplete.js" />
<Content Include="Scripts\NzbDrone\episodeSearch.js" /> <Content Include="Scripts\NzbDrone\localSearch.js" />
<Content Include="Scripts\NzbDrone\Notification.js" /> <Content Include="Scripts\NzbDrone\Notification.js" />
<Content Include="Scripts\NzbDrone\seriesDetails.js" /> <Content Include="Scripts\NzbDrone\seriesDetails.js" />
<Content Include="Scripts\NzbDrone\AutoBind.js" /> <Content Include="Scripts\NzbDrone\AutoBind.js" />

View File

@ -1,12 +0,0 @@
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);
}
});
}

View File

@ -0,0 +1,41 @@
jQuery(document).ready(function () {
$.ajaxSetup({
cache: false
});
var selector = '#localSeriesLookup';
$(document).bind('keydown', 'ctrl+shift+f', function () {
$(selector).focus();
});
$(document).bind('keyup', 's', function () {
$(selector).focus();
});
$(selector).each(function (index, element) {
$(element).blur(function () {
$(element).val("");
});
$(element).watermark('Search...');
$(element).autocomplete({
source: "/Series/LocalSearch",
minLength: 1,
delay: 200,
autoFocus: true,
select: function (event, ui) {
window.location = "../Series/Details?seriesId=" + ui.item.Id;
}
})
.data("autocomplete")._renderItem = function (ul, item) {
return $("<li></li>")
.data("item.autocomplete", item)
.append("<a>" + item.Title + "<br>" + "</a>")
.appendTo(ul);
};
});
});

View File

@ -30,7 +30,7 @@
@Html.IncludeScript("jquery.watermark.min.js") @Html.IncludeScript("jquery.watermark.min.js")
@Html.IncludeScript("jquery.hotkeys.js") @Html.IncludeScript("jquery.hotkeys.js")
@Html.IncludeScript("doTimeout.js") @Html.IncludeScript("doTimeout.js")
@Html.IncludeScript("NzbDrone/episodeSearch.js") @Html.IncludeScript("NzbDrone/localSearch.js")
@Html.IncludeScript("NzbDrone/AutoComplete.js") @Html.IncludeScript("NzbDrone/AutoComplete.js")
@Html.IncludeScript("NzbDrone/Notification.js") @Html.IncludeScript("NzbDrone/Notification.js")
@Html.IncludeScript("NzbDrone/AutoBind.js") @Html.IncludeScript("NzbDrone/AutoBind.js")