Skip to content

Commit

Permalink
remove dead yui code
Browse files Browse the repository at this point in the history
since longer time the repeatable delete is no longer a button created by
yui but directly converted by Jenkins core to button element with class
jenkins-button. So the call to YAHOO.widget.Button.getButton(e.id) will
always return undefined. The layoutUpdateCallback will make sure that
when the delete button is clicked the traitSectionRule is called.
  • Loading branch information
mawinter69 committed Jul 26, 2024
1 parent 81d99ab commit 6ae88c0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/resources/jenkins/scm/api/form/traits/traits.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,4 @@
e.querySelectorAll(".trait-section").forEach(traitSectionRule);
})
});
Behaviour.specify(".repeatable-delete", 'traits', 500, function (e) {
var c = e.closest(".trait-container");
if (c) {
var btn = YAHOO.widget.Button.getButton(e.id);
if (btn) {
btn.on("click", function () {
window.setTimeout(function () {
c.querySelectorAll(".trait-section").forEach(traitSectionRule);
}, 250);
});
}
}
});
})();

0 comments on commit 6ae88c0

Please sign in to comment.