Skip to content

Commit

Permalink
[JENKINS-3107] Rather than preëxpanding the Advanced area, just show …
Browse files Browse the repository at this point in the history
…an icon.
  • Loading branch information
jglick committed May 1, 2013
1 parent 7ce4807 commit ef3d6e4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
21 changes: 10 additions & 11 deletions core/src/main/resources/lib/form/advanced.jelly
Expand Up @@ -40,28 +40,27 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>

<j:new var="customizedFields" className="java.util.TreeSet"/>
<j:mute>
<d:invokeBody/>
</j:mute>
<j:choose>
<j:when test="${!customizedFields.isEmpty()}">
<d:invokeBody/>
</j:when>
<j:otherwise>
<tr><td/><td/>
<td>
<st:adjunct includes="lib.form.advanced.advanced"/>

<div class="advancedLink" style="${attrs.align!=null?('text-align:'+attrs.align):''}">
<input type="button" value="${attrs.title?:'%Advanced'}..." class="advanced-button advancedButton" /><!-- advancedButton is legacy -->
<j:set var="id" value="${h.generateId()}"/>
<span style="display: none" id="${id}">
<img src="${imagesURL}/16x16/document_edit.png" style="vertical-align: super" alt="${%customizedFields}" tooltip="${%customizedFields}"/>
</span>
</div>
<j:new var="customizedFields" className="java.util.TreeSet"/>
<table class="advancedBody"><tbody>
<!-- this is the hidden portion that hosts the "advanced" part. Contents will be moved to the master table when "advanced..." is clicked -->
<d:invokeBody/>
</tbody></table>
<j:if test="${!customizedFields.isEmpty()}">
<script>
$$('${id}').style.display = null;
</script>
</j:if>
</td>
</tr>
</j:otherwise>
</j:choose>
</j:jelly>
23 changes: 23 additions & 0 deletions core/src/main/resources/lib/form/advanced.properties
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright 2013 Jesse Glick.
#
# 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.

customizedFields=One or more fields in this block have been edited.

1 comment on commit ef3d6e4

@olivergondza
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused JENKINS-19391.

Please sign in to comment.