File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,8 @@ THE SOFTWARE.
7070 <j : set var =" id" value =" ${h.generateId()}" />
7171 <f : block >
7272 <input type =" button" value =" ${%Generate Pipeline Script}" onclick =" handlePrototype_${id}(); return false" class =" submit-button primary" />
73- <f : textarea id =" prototypeText_${id}" readonly =" true" style =" margin-top: 10px" />
73+ <f : textarea id =" prototypeText_${id}" readonly =" true" style =" margin-top: 10px; margin-bottom: 5px" />
74+ <l : copyButton text =" " clazz =" jenkins-hidden" />
7475 <script >
7576 function handlePrototype_${id}() {
7677 buildFormTree(document.forms.config);
@@ -84,6 +85,9 @@ THE SOFTWARE.
8485 parameters: {json: json},
8586 onSuccess: function(r) {
8687 document.getElementById('prototypeText_${id}').value = r.responseText;
88+ copybutton = document.querySelector('.jenkins-copy-button');
89+ copybutton.setAttribute("text", r.responseText);
90+ copybutton.classList.remove('jenkins-hidden');
8791 }
8892 });
8993 }
You can’t perform that action at this time.
0 commit comments