mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-26 04:33:01 +01:00
Undeleted localSearch and deleted episodeSearch - sleep is required apparently.
This commit is contained in:
parent
af328c9e55
commit
a7baac9747
@ -384,7 +384,7 @@
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Scripts\NzbDrone\addSeries.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\seriesDetails.js" />
|
||||
<Content Include="Scripts\NzbDrone\AutoBind.js" />
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
41
NzbDrone.Web/Scripts/NzbDrone/localSearch.js
Normal file
41
NzbDrone.Web/Scripts/NzbDrone/localSearch.js
Normal 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);
|
||||
};
|
||||
});
|
||||
});
|
@ -30,7 +30,7 @@
|
||||
@Html.IncludeScript("jquery.watermark.min.js")
|
||||
@Html.IncludeScript("jquery.hotkeys.js")
|
||||
@Html.IncludeScript("doTimeout.js")
|
||||
@Html.IncludeScript("NzbDrone/episodeSearch.js")
|
||||
@Html.IncludeScript("NzbDrone/localSearch.js")
|
||||
@Html.IncludeScript("NzbDrone/AutoComplete.js")
|
||||
@Html.IncludeScript("NzbDrone/Notification.js")
|
||||
@Html.IncludeScript("NzbDrone/AutoBind.js")
|
||||
|
Loading…
Reference in New Issue
Block a user