09c2b2e788c8cae028446ae7a948df6b1027eb56
chmalee
Wed Aug 21 11:29:48 2024 -0700
Trying to simply update jquery-ui.js and jquery-ui.css to version 1.14.
diff --git src/hg/js/autocomplete.js src/hg/js/autocomplete.js
index 86e5924..d25fef5 100644
--- src/hg/js/autocomplete.js
+++ src/hg/js/autocomplete.js
@@ -109,42 +109,42 @@
maxHeight: 'none',
overflow: 'hidden',
zIndex: 12
});
}
},
select: function(event, ui) {
lastSelected = ui.item.value;
suggestBox.updateFindMatches(ui.item.internalId);
addRecentSearch(db, ui.item.geneSymbol, ui.item);
selectCallback(ui.item);
// jQuery('body').css('cursor', 'wait');
// document.TrackHeaderForm.submit();
}
})
- .data("autocomplete")._renderMenu = function(ul, items) {
+ ._renderMenu = function(ul, items) {
var that = this;
jQuery.each(items, function(index, item) {
that._renderItem(ul, item);
});
if ($(this)[0].term === "") {
ul.append("
Showing 5 most recent searches. Enter 2 or more characters to start auto-complete search. Click the go button or press Enter to search across all tracks, hubs and our website. See 'examples' link above.
");
} else {
ul.append("
Click the go button or press Enter to search across all tracks, hubs and our website. See 'examples' link above.
");
}
};
- $("#positionInput").data("autocomplete")._renderItem = function(ul, item) {
+ $("#positionInput")._renderItem = function(ul, item) {
// In order to use HTML markup in the autocomplete, one has to overwrite
// autocomplete's _renderItem method using .html instead of .text.
// http://forum.jquery.com/topic/using-html-in-autocomplete
let clockIcon = '';
if ($("#positionInput").val().length < 2) {
clockIcon = ' ';
}
return $("")
.data("item.autocomplete", item)
.append($("").html(clockIcon + item.label))
.appendTo(ul);
};
}
// I want to set focus to the suggest element, but unforunately that prevents PgUp/PgDn from