From f2ceaf66e49670a8cf34b14a84b7be9b2a4f2054 Mon Sep 17 00:00:00 2001 From: Shlomo Dahan <64103471+shlomomdahan@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:21:10 -0500 Subject: [PATCH] [JENKINS-74055] Extract inline script block in `BuildPipelineView/main_dashboard.jelly` (#149) --- .../BuildPipelineView/main_dashboard.jelly | 13 +------------ .../BuildPipelineView/toggle-build-details.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/toggle-build-details.js diff --git a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/main_dashboard.jelly b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/main_dashboard.jelly index 32108a49..f0c0b8e7 100755 --- a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/main_dashboard.jelly +++ b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/main_dashboard.jelly @@ -2,16 +2,5 @@ - + diff --git a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/toggle-build-details.js b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/toggle-build-details.js new file mode 100644 index 00000000..52da9aa0 --- /dev/null +++ b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/toggle-build-details.js @@ -0,0 +1,10 @@ +// show/hide build details +jQuery(document).ready(function() { + jQuery(".header").click(function() { + var parent = jQuery(this).parent(); + var ba = parent.find(".build-actions"); + var bb = parent.find(".build-body"); + + ba.add(bb).toggle('slow'); + }); +});