jQuery: Migrate to .on(), .off(), .trigger()

This avoids methods that are deprecated in newer versions of jQuery.
This commit is contained in:
webzwo0i 2021-07-05 17:12:47 +02:00 committed by Richard Hansen
parent c7195b1133
commit 4f99933d12
47 changed files with 196 additions and 196 deletions

View file

@ -205,7 +205,7 @@ const padutils = {
// It is work on Windows (IE8, Chrome 6.0.472), CentOs (Firefox 3.0) and Mac OSX (Firefox
// 3.6.10, Chrome 6.0.472, Safari 5.0).
if (onEnter) {
node.keypress((evt) => {
node.on('keypress', (evt) => {
if (evt.which === 13) {
onEnter(evt);
}
@ -213,7 +213,7 @@ const padutils = {
}
if (onEscape) {
node.keydown((evt) => {
node.on('keydown', (evt) => {
if (evt.which === 27) {
onEscape(evt);
}
@ -280,7 +280,7 @@ const padutils = {
}
field.removeClass('editempty');
});
field.blur(() => {
field.on('blur', () => {
if (!field.val()) {
clear();
}
@ -298,7 +298,7 @@ const padutils = {
}
},
bindCheckboxChange: (node, func) => {
$(node).change(func);
$(node).on('change', func);
},
encodeUserId: (userId) => userId.replace(/[^a-y0-9]/g, (c) => {
if (c === '.') return '-';