Skip to content

Commit d69d4cf

Browse files
authored
Extract inline onClick handler (#306)
1 parent 0920d8b commit d69d4cf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/resources/io/jenkins/plugins/DingTalkRobotConfig/config.jelly

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
</f:entry>
4343
</j:scope>
4444

45+
<st:adjunct includes="io.jenkins.plugins.DingTalkRobotConfig.validate-robot-config-onclick"/>
4546
<div class="robot-config-validate-msg"><!-- this is where the error message goes --></div>
4647
<div style="text-align: right;">
4748
<input
@@ -51,7 +52,6 @@
5152
data-validate-button-descriptor-url="${descriptor.descriptorFullUrl}"
5253
data-validate-button-method="test"
5354
data-validate-button-with="${with}"
54-
onclick="validateRobotConfig(this)"
5555
/>
5656
</div>
5757
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Behaviour.specify('.robot-config-validate-btn', 'validate-robot-config', 0, function(element) {
2+
element.addEventListener('click', function() {
3+
validateRobotConfig(this);
4+
});
5+
});

0 commit comments

Comments
 (0)