Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-25220] - Handle legacy use of iconSize as a variable (#…
…1455)

* Handle legacy use of iconSize as a variable

When iconSize was set as a jelly variable, not passed as an attribute,
the value was not being normalized to an IconSizeClass. Fixes
JENKINS-25220.

* Evaluate attrs.iconSize explicitly.
  • Loading branch information
michmerr authored and daniel-beck committed May 20, 2016
1 parent 20cb8fd commit 032501d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/src/main/resources/lib/hudson/ballColorTd.jelly
Expand Up @@ -44,8 +44,15 @@ THE SOFTWARE.
<j:set var="iconClassName" value="${icons.toNormalizedIconNameClass(it.image)}"/>
</j:if>
<!-- convert legacy @iconSize specification to @iconSizeClass -->
<j:if test="${iconSizeClass==null and attrs.iconSize!=null}">
<j:set var="iconSizeClass" value="${icons.toNormalizedIconSizeClass(attrs.iconSize)}"/>
<j:if test="${iconSizeClass==null}">
<j:choose>
<j:when test="${attrs.iconSize!=null}">
<j:set var="iconSizeClass" value="${icons.toNormalizedIconSizeClass(attrs.iconSize)}"/>
</j:when>
<j:when test="${iconSize!=null}">
<j:set var="iconSizeClass" value="${icons.toNormalizedIconSizeClass(iconSize)}" />
</j:when>
</j:choose>
</j:if>

<j:choose>
Expand Down

0 comments on commit 032501d

Please sign in to comment.