Skip to content

Commit

Permalink
[JENKINS-74098] Remove inline JS script and legacy onClick handler (#147
Browse files Browse the repository at this point in the history
)

* remove inline JS script and legacy onClick handler

* remove inline JS script and legacy onClick handler

* remove inline JS script and legacy onClick handler

---------

Co-authored-by: Mark Waite <[email protected]>
  • Loading branch information
shlomomdahan and MarkEWaite authored Nov 25, 2024
1 parent efbb7f5 commit 3e73a37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/resources/hudson/plugins/plot/PlotReport/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@
<l:main-panel>
<h1><l:icon class="icon-graph icon-xlg"/>${it.group}</h1>
<div>
<script>
function jump(menu){
window.location.hash = menu.value;
}
</script>
${%Jump to} <select name="choice" onChange="jump(this)">
<st:adjunct includes="hudson.plugins.plot.PlotReport.jump-to-plot" />
${%Jump to} <select class="plot-selector" name="choice">
<j:forEach var="plotJump" items="${it.plots}" varStatus="loopStat">
<option value="#${plotJump.csvFileName}">${%Plot} ${loopStat.count}: ${plotJump.title}</option>
</j:forEach>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
const plotSelector = document.querySelector('.plot-selector');
plotSelector.addEventListener('change', function(e) {
window.location.hash = e.target.value;
});
});

0 comments on commit 3e73a37

Please sign in to comment.