diff --git a/core/src/main/resources/hudson/model/ComputerSet/index.jelly b/core/src/main/resources/hudson/model/ComputerSet/index.jelly index 5e957e2bd9c0..5b6ba8f0d460 100644 --- a/core/src/main/resources/hudson/model/ComputerSet/index.jelly +++ b/core/src/main/resources/hudson/model/ComputerSet/index.jelly @@ -26,7 +26,7 @@ THE SOFTWARE. Entrance to the configuration page --> - + @@ -52,6 +52,9 @@ THE SOFTWARE. + + + @@ -123,13 +126,6 @@ THE SOFTWARE. - -
- -
-
diff --git a/src/main/js/pages/computer-set/index.js b/src/main/js/pages/computer-set/index.js index 8a751c25bd51..08cedcf46d9c 100644 --- a/src/main/js/pages/computer-set/index.js +++ b/src/main/js/pages/computer-set/index.js @@ -1,16 +1,22 @@ import { createElementFromHtml } from "@/util/dom"; +import behaviorShim from "@/util/behavior-shim"; -document - .querySelector("#button-computer-icon-legend") - .addEventListener("click", () => { - const template = document.querySelector("#template-computer-icon-legend"); - const title = template.getAttribute("data-title"); - const content = createElementFromHtml( - "
" + template.innerHTML + "
", - ); +behaviorShim.specify( + "#button-computer-icon-legend", + "icon-legend", + 999, + (button) => { + button.addEventListener("click", () => { + const template = document.querySelector("#template-computer-icon-legend"); + const title = template.getAttribute("data-title"); + const content = createElementFromHtml( + "
" + template.innerHTML + "
", + ); - dialog.modal(content, { - maxWidth: "550px", - title: title, + dialog.modal(content, { + maxWidth: "550px", + title: title, + }); }); - }); + }, +);