|
|
|
@ -8,12 +8,8 @@
|
|
|
|
|
$(document).bind('keydown', 'ctrl+shift+f', function () {
|
|
|
|
|
$('#localSeriesLookup').focus();
|
|
|
|
|
});
|
|
|
|
|
$(document).bind('keyup', 's', function () {
|
|
|
|
|
$('#localSeriesLookup').focus();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
$('.folderLookup:not(.ui-autocomplete-input), .seriesLookup:not(.ui-autocomplete-input), .localSeriesLookup:not(.ui-autocomplete-input)').live('focus', function (event) {
|
|
|
|
|
bindAutoCompletes();
|
|
|
|
|
});
|
|
|
|
@ -21,7 +17,6 @@ $('.folderLookup:not(.ui-autocomplete-input), .seriesLookup:not(.ui-autocomplete
|
|
|
|
|
function bindAutoCompletes() {
|
|
|
|
|
bindFolderAutoComplete(".folderLookup");
|
|
|
|
|
bindSeriesAutoComplete(".seriesLookup");
|
|
|
|
|
bindLocalSeriesAutoComplete("#localSeriesLookup");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bindFolderAutoComplete(selector) {
|
|
|
|
@ -68,25 +63,3 @@ function bindSeriesAutoComplete(selector) {
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bindLocalSeriesAutoComplete(selector) {
|
|
|
|
|
|
|
|
|
|
$(selector).each(function (index, element) {
|
|
|
|
|
$(element).watermark('Search...');
|
|
|
|
|
$(element).autocomplete({
|
|
|
|
|
source: "/Series/LocalSearch",
|
|
|
|
|
minLength: 1,
|
|
|
|
|
delay: 100,
|
|
|
|
|
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><strong>" + item.Title + "</strong><br>" + "</a>")
|
|
|
|
|
.appendTo(ul);
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|