Skip to content

Commit

Permalink
Update multivalue options [rundeck#220]
Browse files Browse the repository at this point in the history
Edit delimiter form descriptive text.
improve display of multi-value options form.
  • Loading branch information
gschueler committed Mar 15, 2011
1 parent 2fa29c7 commit 8db6fb2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rundeckapp/grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ execution.show.mode.Compact.desc=View all output collated by node

#form text
form.option.multivalued.description=Allow multiple input values to be chosen.
form.option.delimiter.description=Delimiter will be used to join all input values.
form.option.delimiter.description=Delimiter will be used to join all input values. Can be any string: ' ' (space), ',' (comma), etc...

# API Messages
api.error.api-version.required=API Version not specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<g:if test="${!optionSelect.enforced}">
<%-- variable input text fields --%>
<div class="optionvaluemulti ">
<span class="action button obs_addvar" style="margin-left:20px" onclick="ExecutionOptions.addMultivarValue('${optName.encodeAsJavaScript()}','${rkey}varinput');">
<span class="action button obs_addvar" onclick="ExecutionOptions.addMultivarValue('${optName.encodeAsJavaScript()}','${rkey}varinput');">
New Value&hellip;
</span>
</div>
Expand Down
23 changes: 19 additions & 4 deletions rundeckapp/web-app/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,29 @@ h1 {
.optname.required{
font-weight:bold;
}
.optionvaluemulti{
margin:4px 0;
.optionvaluemulti label{
padding: 2px 4px;
}
.optionvaluemulti label{
display:block;
}
.optionvaluemulti label:hover{
background: #e3edfa;
}

.optionvaluemulti span.action {
display:block;
margin:4px;
}
.optionvaluemulti div.varinput {
margin:4px;
}
.optionmultiarea{
overflow-y: auto;
max-height: 8em;
max-height: 11em;
border: 1px solid #ddd;
padding: 4px;
padding: 0;
min-width: 200px;
}
.enforceSet{
text-align:center;
Expand Down
8 changes: 6 additions & 2 deletions rundeckapp/web-app/js/executionOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ var ExecutionOptions = {
div.addClassName('optionvaluemulti');
div.setStyle({'opacity':'0'});

var divwrap = new Element('div');
divwrap.addClassName('varinput');

var inpu = new Element('input');
inpu.setAttribute("type", "checkbox");
inpu.setAttribute("name", "extra.option." + name);
Expand All @@ -75,8 +78,9 @@ var ExecutionOptions = {
Event.observe(inpu2, 'change', ExecutionOptions.multiVarInputChangeHandler.curry(inpu));
Event.observe(inpu2, 'keydown', ExecutionOptions.multiVarInputKeydownHandler.curry(inpu));

$(div).appendChild(inpu);
$(div).appendChild(inpu2);
$(divwrap).appendChild(inpu);
$(divwrap).appendChild(inpu2);
$(div).appendChild(divwrap);
$(inputarea).insert({top:div});
$$('#' + name + '_state span.reqwarning').each(Element.hide);
Try.these(
Expand Down

0 comments on commit 8db6fb2

Please sign in to comment.