Skip to content

Commit

Permalink
select all pipeline wrappers - incase multiple builds selected
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomomdahan committed Nov 7, 2024
1 parent 7beca34 commit 188bc43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<st:include from="${from.getRowHeaders()}" it="${from}"
page="rowHeader.jelly"/>

<div class="pipeline main-pipeline-selector">
<div class="pipeline">
<table class="pipelines">
<tbody>
<j:forEach begin="${0}" end="${buildGrid.rows - 1}" indexVar="x">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,15 @@ const onclickElements = {
};

document.addEventListener("DOMContentLoaded", function () {
const parentElement = document.querySelector(".main-pipeline-selector");
if (!parentElement) return;
const pipelineWrappers = document.querySelectorAll(".pipeline-wrapper");

Object.entries(onclickElements).forEach(function(entry) {
const selector = entry[0];
const handlerConfig = entry[1];
createClickHandler(parentElement, selector, handlerConfig.handler);
if (!pipelineWrappers.length) return;

pipelineWrappers.forEach(wrapper => {
Object.entries(onclickElements).forEach(function(entry) {
const selector = entry[0];
const handlerConfig = entry[1];
createClickHandler(wrapper, selector, handlerConfig.handler);
});
});
});

0 comments on commit 188bc43

Please sign in to comment.