mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
TopSlider added for local series searching!
Should be easy to add others (would want to have it close other open ones, I think).
This commit is contained in:
parent
08804208cf
commit
745d9d9355
13 changed files with 241 additions and 78 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
bindFolderAutoComplete(".folderLookup");
|
||||
bindSeriesAutoComplete(".seriesLookup");
|
||||
bindLocalSeriesAutoComplete(".localSeriesLookup");
|
||||
});
|
||||
|
||||
function bindFolderAutoComplete(selector) {
|
||||
|
@ -51,4 +52,24 @@ function bindSeriesAutoComplete(selector) {
|
|||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function bindLocalSeriesAutoComplete(selector) {
|
||||
|
||||
$(selector).each(function (index, element) {
|
||||
$(element).autocomplete({
|
||||
source: "/Series/LocalSearch",
|
||||
minLength: 3,
|
||||
delay: 500,
|
||||
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><strong>" + item.Title + "</strong><br>" + "</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue