提交 72455164 编写于 作者: K kohsuke

Noting that "x?y:z" supercedes h.ifThenElse.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16487 71c3de6d-444a-0410-be80-ed276b4c234a
上级 3e396876
......@@ -306,6 +306,11 @@ public class Functions {
return Items.toNameList(projects);
}
/**
* @deprecated as of 1.294
* JEXL now supports the real ternary operator "x?y:z", so this work around
* is no longer necessary.
*/
public static Object ifThenElse(boolean cond, Object thenValue, Object elseValue) {
return cond ? thenValue : elseValue;
}
......
......@@ -31,7 +31,7 @@ THE SOFTWARE.
red : if set to non-null, the progress bar will be drawn in red, to indicate that the processing is likely stuck.
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<table class="progress-bar ${attrs.red?'red':null}" id="${attrs.id}" tooltip="${attrs.tooltip}" href="${attrs.href}" style="${h.ifThenElse(attrs.href!=null,'cursor:pointer',null)}">
<table class="progress-bar ${attrs.red?'red':null}" id="${attrs.id}" tooltip="${attrs.tooltip}" href="${attrs.href}" style="${attrs.href!=null ? 'cursor:pointer' : null}">
<j:choose>
<j:when test="${pos lt 0}">
<!-- style sheet will fill in the progress bar image -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册