Skip to content

Commit

Permalink
[JENKINS-74055] Extract inline script block in `BuildPipelineView/mai…
Browse files Browse the repository at this point in the history
…n_dashboard.jelly` (#149)
  • Loading branch information
shlomomdahan authored Nov 8, 2024
1 parent 66867ef commit f2ceaf6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,5 @@
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<st:include page="bpp.jelly" from="${it.getBuildPipelineView()}" />
<link href="${rootURL}/plugin/build-pipeline-plugin/css/main_dashboard.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
// 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');
});
});
</script>
<st:adjunct includes="au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.toggle-build-details" />
</j:jelly>
Original file line number Diff line number Diff line change
@@ -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');
});
});

0 comments on commit f2ceaf6

Please sign in to comment.