未验证 提交 cb26ec56 编写于 作者: B Basil Crow 提交者: GitHub

[JENKINS-70933] Remove Prototype `Event.on` usages from `confirm.js` (#7794)

上级 36c73a4b
......@@ -77,12 +77,12 @@
var button = buttons[i];
name = button.getAttribute("name");
if (name == "Submit" || name == "Apply" || name == "OK") {
$(button).on("click", function () {
button.addEventListener("click", function () {
needToConfirm = false;
});
} else {
if (isModifyingButton(button)) {
$(button).on("click", confirm);
button.addEventListener("click", confirm);
}
}
}
......@@ -92,9 +92,9 @@
var input = inputs[i];
if (!isIgnoringConfirm(input)) {
if (input.type == "checkbox" || input.type == "radio") {
$(input).on("click", confirm);
input.addEventListener("click", confirm);
} else {
$(input).on("input", confirm);
input.addEventListener("input", confirm);
}
}
}
......@@ -103,7 +103,7 @@
for (let i = 0; i < inputs.length; i++) {
let input = inputs[i];
if (!isIgnoringConfirm(input)) {
$(input).on("change", confirm);
input.addEventListener("change", confirm);
}
}
......@@ -111,7 +111,7 @@
for (let i = 0; i < inputs.length; i++) {
let input = inputs[i];
if (!isIgnoringConfirm(input)) {
$(input).on("input", confirm);
input.addEventListener("input", confirm);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册