Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-6797] Made a patched copy of hetero-radio to fix issue…
…s with closed radio details.
- Loading branch information
Stefan Wolf
committed
Apr 6, 2014
1 parent
99b61bb
commit 68fb001
Showing
4 changed files
with
104 additions
and
53 deletions.
There are no files selected for viewing
53 changes: 28 additions & 25 deletions
53
src/main/resources/hudson/plugins/groovy/Groovy/config.jelly
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 |
---|---|---|
@@ -1,35 +1,38 @@ | ||
<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:t="/lib/hudson" xmlns:f="/lib/form" xmlns:g="/hudson/plugins/groovy/form"> | ||
|
||
<f:entry title="${%Groovy Version}"> | ||
<select class="setting-input" name="groovy.groovyName"> | ||
<option value="(Default)">(${%Default}) | ||
</option> | ||
<j:forEach var="inst" items="${descriptor.installations}"> | ||
<f:option selected="${inst.name.equals(instance.groovyName)}" value="${inst.name}">${inst.name} | ||
</f:option> | ||
</j:forEach> | ||
</select> | ||
<select class="setting-input" name="groovy.groovyName"> | ||
<option value="(Default)">(${%Default}) | ||
</option> | ||
<j:forEach var="inst" items="${descriptor.installations}"> | ||
<f:option selected="${inst.name.equals(instance.groovyName)}" value="${inst.name}">${inst.name} | ||
</f:option> | ||
</j:forEach> | ||
</select> | ||
</f:entry> | ||
|
||
<f:entry> | ||
<f:hetero-radio field="scriptSource" descriptors="${descriptor.scriptSources}" /> | ||
<g:multi-hetero-radio field="scriptSource" descriptors="${descriptor.scriptSources}" | ||
id="${descriptor.nextInstanceID()}"/> | ||
</f:entry> | ||
|
||
<f:advanced> | ||
<f:entry title="Groovy parameters" help="/plugin/groovy/parameters.html" field="parameters"> | ||
<f:expandableTextbox /> | ||
</f:entry> | ||
<f:entry title="Class path" help="/plugin/groovy/classpath.html" field="classPath" > | ||
<f:expandableTextbox /> | ||
</f:entry> | ||
<f:entry title="Script parameters" help="/plugin/groovy/script-parameters.html" field="scriptParameters"> | ||
<f:expandableTextbox /> | ||
</f:entry> | ||
<f:entry title="${%Properties}" help="/plugin/groovy/properties.html" field="properties"> | ||
<f:textarea /> | ||
</f:entry> | ||
<f:entry title="${%Java opts}" help="/plugin/groovy/javaOpts.html" field="javaOpts"> | ||
<f:textbox /> | ||
</f:entry> | ||
<f:entry title="Groovy parameters" help="/plugin/groovy/parameters.html" field="parameters"> | ||
<f:expandableTextbox/> | ||
</f:entry> | ||
<f:entry title="Class path" help="/plugin/groovy/classpath.html" field="classPath"> | ||
<f:expandableTextbox/> | ||
</f:entry> | ||
<f:entry title="Script parameters" help="/plugin/groovy/script-parameters.html" field="scriptParameters"> | ||
<f:expandableTextbox/> | ||
</f:entry> | ||
<f:entry title="${%Properties}" help="/plugin/groovy/properties.html" field="properties"> | ||
<f:textarea/> | ||
</f:entry> | ||
<f:entry title="${%Java opts}" help="/plugin/groovy/javaOpts.html" field="javaOpts"> | ||
<f:textbox/> | ||
</f:entry> | ||
</f:advanced> | ||
|
||
</j:jelly> |
42 changes: 14 additions & 28 deletions
42
src/main/resources/hudson/plugins/groovy/SystemGroovy/config.jelly
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 |
---|---|---|
@@ -1,47 +1,33 @@ | ||
<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"> | ||
|
||
<!-- <f:entry title="Groovy command"> | ||
<f:textarea name="groovy.command" value="${instance.command}"/> | ||
</f:entry> --> | ||
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:g="/hudson/plugins/groovy/form"> | ||
|
||
<j:if test="${not h.hasPermission(app.ADMINISTER)}"> | ||
<f:invisibleEntry> | ||
<f:textbox name="groovy.secret" value="${instance.secret}" /> | ||
<f:textbox name="groovy.secret" value="${instance.secret}"/> | ||
</f:invisibleEntry> | ||
<f:entry > | ||
<f:entry> | ||
<div class="warning"> | ||
Only Administrator can configure the System Groovy script to be executed.<br/> | ||
Only Administrator can configure the System Groovy script to be executed. | ||
<br/> | ||
Configuration is displayed for your information only, any change will be ignored. | ||
</div> | ||
</f:entry> | ||
</j:if> | ||
|
||
<f:entry> | ||
<f:hetero-radio field="scriptSource" descriptors="${descriptor.scriptSources}" /> | ||
<g:multi-hetero-radio field="scriptSource" descriptors="${descriptor.scriptSources}" | ||
id="${descriptor.nextInstanceID()}"/> | ||
</f:entry> | ||
|
||
<!--<j:set var="instanceID" value="${descriptor.nextInstanceID()}" />--> | ||
<!--<j:forEach var="d" items="${descriptor.scriptSources}" varStatus="loop">--> | ||
<!--<f:radioBlock name="${instanceID}.scriptSource" help="${d.helpFile}" value="${loop.index}"--> | ||
<!--title="${d.displayName}" checked="${instance.scriptSource.descriptor==d}">--> | ||
<!--<st:include from="${d}" page="${d.configPage}" />--> | ||
<!--<f:invisibleEntry><!– this tells Stapler which block is for which class –>--> | ||
<!--<input type="hidden" name="stapler-class" value="${d.clazz.name}" />--> | ||
<!--</f:invisibleEntry>--> | ||
<!--</f:radioBlock>--> | ||
<!--</j:forEach>--> | ||
|
||
<f:advanced> | ||
<f:entry title="${%Variable bindings}" help="/plugin/groovy/bindings.html" field="bindings"> | ||
<f:textarea /> | ||
</f:entry> | ||
<f:entry title="${%Variable bindings}" help="/plugin/groovy/bindings.html" field="bindings"> | ||
<f:textarea/> | ||
</f:entry> | ||
|
||
<f:entry title="${%Classpath}" help="/plugin/groovy/classpath.html" field="classpath"> | ||
<f:textbox /> | ||
</f:entry> | ||
<f:entry title="${%Classpath}" help="/plugin/groovy/classpath.html" field="classpath"> | ||
<f:textbox/> | ||
</f:entry> | ||
</f:advanced> | ||
|
||
</j:jelly> | ||
|
||
|
||
</j:jelly> |
62 changes: 62 additions & 0 deletions
62
src/main/resources/hudson/plugins/groovy/form/multi-hetero-radio.jelly
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,62 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
|
||
<?jelly escape-by-default='true'?> | ||
<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:local="local"> | ||
<st:documentation> | ||
Sibling of hetero-list, which only allows the user to pick one type from the list of descriptors and configure | ||
it. | ||
|
||
<st:attribute name="field" use="required"> | ||
Field name in the parent object where databinding happens. | ||
</st:attribute> | ||
<st:attribute name="descriptors" use="required"> | ||
all types that the user can add. | ||
</st:attribute> | ||
<st:attribute name="id" use="required"> | ||
Id of the radioBlock group. | ||
</st:attribute> | ||
</st:documentation> | ||
|
||
<f:prepareDatabinding/> | ||
|
||
<table style="width:100%"> | ||
<j:set var="currentInstance" value="${instance[field]}"/> | ||
<j:set var="currentDescriptor" value="${currentInstance.descriptor}"/> | ||
<j:forEach var="d" items="${descriptors}" varStatus="loop"> | ||
<f:radioBlock name="${id}.${field}" help="${d.helpFile}" value="${loop.index}" | ||
title="${d.displayName}" checked="${currentDescriptor==d}"> | ||
<j:set var="descriptor" value="${d}"/> | ||
<j:set var="instance" value="${currentDescriptor==d?currentInstance:null}"/> | ||
<st:include from="${d}" page="${d.configPage}" optional="true"/> | ||
|
||
<f:invisibleEntry><!-- this tells Stapler which block is for which class --> | ||
<input type="hidden" name="stapler-class" value="${d.clazz.name}"/> | ||
</f:invisibleEntry> | ||
</f:radioBlock> | ||
</j:forEach> | ||
</table> | ||
<!-- TODO consider customizedFields --> | ||
</j:jelly> |
Empty file.