Skip to content

Commit

Permalink
Drop relics that were for jQuery UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Jan 7, 2025
1 parent 429384d commit 81c8b4c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions share/static/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,18 +661,7 @@ function refreshCollectionListRow(tr, table, success, error) {
});
}

// disable submit on enter in autocomplete boxes
htmx.onLoad(function() {
jQuery('input[data-autocomplete], input.ui-autocomplete-input').each(function() {
var input = jQuery(this);

input.on('keypress', function(event) {
if (event.keyCode === 13 && jQuery('ul.ui-autocomplete').is(':visible')) {
return false;
}
});
});
});

function escapeCssSelector(str) {
return str.replace(/([^A-Za-z0-9_-])/g,'\\$1');
Expand Down Expand Up @@ -757,7 +746,7 @@ jQuery(function() {

document.body.addEventListener('htmx:beforeRequest', function(evt) {
if ( evt.detail.boosted ) {
document.querySelectorAll('.ui-helper-hidden-accessible, ul[id^="ui-id-"], .cke_autocomplete_panel, #ui-datepicker-div').forEach(function(elt) {
document.querySelectorAll('.cke_autocomplete_panel').forEach(function(elt) {
elt.remove();
});
document.getElementById('hx-boost-spinner').classList.remove('d-none');
Expand Down

0 comments on commit 81c8b4c

Please sign in to comment.