diff --git a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly index d50bd9e3..546e01fb 100644 --- a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly +++ b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly @@ -124,7 +124,7 @@ -
+
diff --git a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js index 78d6e594..ccad37db 100644 --- a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js +++ b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js @@ -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); + }); }); });