-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-74199] Extract inline script block and event handler in `Pol…
…lNowAction/action.jelly` (#47) * Extract inline onClick handler and JS script * Extract inline onClick handler and JS script * Extract inline onClick handler and JS script * Extract inline onClick handler and JS script
- Loading branch information
1 parent
8eb4e88
commit 70b2c2b
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/resources/org/jenkinsci/plugins/pollscm/PollNowAction/polling.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
window.pollAction = function(element, event) { | ||
event.preventDefault(); | ||
|
||
fetch(element.href, { | ||
method: "post", | ||
headers: crumb.wrap({}) | ||
}); | ||
|
||
hoverNotification('Poll scheduled', element.parentNode); | ||
return false; | ||
}; |