提交 3e396876 编写于 作者: K kohsuke

replaced h.ifThenElse with "x?y:z" (and occasionally with "x?:y")

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16486 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a722c278
......@@ -45,15 +45,15 @@ THE SOFTWARE.
<j:forEach var="p" items="${app.pluginManager.plugins}">
<tr>
<td class="center pane">
<j:set var="state" value="${h.ifThenElse(p.enabled,'true',null)}"/>
<j:set var="state" value="${p.enabled?'true':null}"/>
<input type="checkbox" checked="${state}" onclick="flip(event)"
url="plugin/${p.shortName}"
original="${h.ifThenElse(p.active,'true','false')}"/>
original="${p.active?'true':'false'}"/>
</td>
<td class="pane">
<div>
<a href="${p.url}">
${h.ifThenElse(p.updateInfo!=null, p.updateInfo.title, p.longName)}
${p.updateInfo.title?:p.longName}
</a>
</div>
<div class="excerpt">
......
......@@ -67,7 +67,7 @@ THE SOFTWARE.
var labels = new YAHOO.widget.TextNode("${%Labels}", tree.getRoot(), false);
<j:forEach var="l" items="${app.labels}">
new YAHOO.widget.TextNode('&lt;input type="checkbox" name="label.${l.name}" id="label.${l.name}" <j:if test="${labels.contains(l)}">checked</j:if>&gt;<label for="label.${l.name}">${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})</label>', ${h.ifThenElse(l.isSelfLabel(),'machines','labels')}, false);
new YAHOO.widget.TextNode('&lt;input type="checkbox" name="label.${l.name}" id="label.${l.name}" <j:if test="${labels.contains(l)}">checked</j:if>&gt;<label for="label.${l.name}">${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})</label>', ${l.isSelfLabel()?'machines':'labels'}, false);
</j:forEach>
tree.draw();
......
......@@ -43,7 +43,7 @@ THE SOFTWARE.
<j:if test="${it.configurable}">
<j:if test="${!it.disabled}">
<l:task icon="images/24x24/clock.gif" href="${url}/build?delay=0sec" title="${%Build Now}"
onclick="${h.ifThenElse(it.parameterized,null,'return build(this)')}" permission="${it.BUILD}" />
onclick="${it.parameterized?null:'return build(this)'}" permission="${it.BUILD}" />
<script>
function build(a) {
new Ajax.Request(a.href,{method:"post"});
......
......@@ -23,5 +23,5 @@ THE SOFTWARE.
-->
<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">
<!-- upstreamUrl added in 1.284, so handle missing value -->
<p>${h.ifThenElse(it.upstreamUrl!=null,"%started_by_project(it.upstreamProject,it.upstreamBuild.toString(),it.upstreamUrl,rootURL)",it.shortDescription)}</p>
<p>${it.upstreamUrl!=null ? "%started_by_project(it.upstreamProject,it.upstreamBuild.toString(),it.upstreamUrl,rootURL)" : it.shortDescription}</p>
</j:jelly>
......@@ -58,8 +58,8 @@ THE SOFTWARE.
checked="${it.slaveAgentPort &gt; 0}" onclick="$('sat.port').disabled=false"/>
<label for="sat.fixed">${%Fixed}</label> :
<input type="text" class="number" name="slaveAgentPort" id="sat.port"
value="${h.ifThenElse(it.slaveAgentPort &gt; 0, it.slaveAgentPort, null)}"
disabled="${h.ifThenElse(it.slaveAgentPort &gt; 0, null, 'true')}"/>
value ="${it.slaveAgentPort gt 0 ? it.slaveAgentPort : null}"
disabled="${it.slaveAgentPort gt 0 ? null : 'true'}"/>
<st:nbsp />
......
......@@ -42,7 +42,7 @@ THE SOFTWARE.
<j:arg value="150" />
</j:invokeStatic>
<!-- Show at most last 150KB (can override with system property) unless consoleFull is set -->
<j:set var="offset" value="${h.ifThenElse(empty(consoleFull),it.logFile.length()-threshold*1024,0)}" />
<j:set var="offset" value="${empty(consoleFull) ? it.logFile.length()-threshold*1024 : 0}" />
<j:choose>
<j:when test="${offset > 0}">
${%skipSome(offset/1024,"consoleFull")}
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<l:main-panel>
<h1>
<img src="${imagesURL}/48x48/notepad.gif" alt=""/>
${%buildHistory(h.ifThenElse(it.class.name=='hudson.model.AllView',app.displayName,it.displayName))}
${%buildHistory(it.class.name=='hudson.model.AllView' ? app.displayName : it.displayName)}
</h1>
<t:buildListTable builds="${it.builds}"/>
</l:main-panel>
......
......@@ -35,7 +35,7 @@ THE SOFTWARE.
<j:set var="lb" value="${p.lastCompletedBuild}"/>
<j:if test="${lb!=null}">
<Project name="${p.displayName}"
activity="${h.ifThenElse(p.isBuilding(),'Building','Sleeping')}"
activity="${p.isBuilding() ? 'Building' : 'Sleeping'}"
lastBuildStatus="${h.toCCStatus(p)}"
lastBuildLabel="${lb.number}"
lastBuildTime="${lb.timestampString2}"
......
......@@ -25,7 +25,7 @@ THE SOFTWARE.
<st:compress 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:i="jelly:fmt">
<st:header name="X-Hudson" value="${servletContext.getAttribute('version')}" />
<j:new var="h" className="hudson.Functions" /><!-- instead of JSP functions -->
<l:layout title="${h.ifThenElse(it.class.name=='hudson.model.AllView','%Dashboard',it.viewName)}">
<l:layout title="${it.class.name=='hudson.model.AllView' ? '%Dashboard' : it.viewName}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<div id="view-message">
......
......@@ -54,7 +54,7 @@ THE SOFTWARE.
title="${d.displayName}">
<j:set var="descriptor" value="${d}"/>
<j:set var="instance"
value="${h.ifThenElse(it.launcher.descriptor==d,it.launcher,null)}"/>
value="${it.launcher.descriptor==d ? it.launcher : null}"/>
<tr><td>
<input type="hidden" name="stapler-class" value="${d.clazz.name}" />
</td></tr>
......@@ -74,7 +74,7 @@ THE SOFTWARE.
title="${d.displayName}">
<j:set var="descriptor" value="${d}"/>
<j:set var="instance"
value="${h.ifThenElse(it.retentionStrategy.descriptor==d,it.retentionStrategy,null)}"/>
value="${it.retentionStrategy.descriptor==d ? it.retentionStrategy : null}"/>
<tr><td>
<input type="hidden" name="stapler-class" value="${d.clazz.name}" />
</td></tr>
......
......@@ -48,7 +48,7 @@ THE SOFTWARE.
</f:entry>
<f:entry title="${%Hudson URL}"
help="/help/tasks/mailer/url.html">
<f:textbox field="url" value="${h.ifThenElse(descriptor.url!=null,descriptor.url,h.inferHudsonURL(request))}" />
<f:textbox field="url" value="${descriptor.url ?: h.inferHudsonURL(request)}" />
</f:entry>
<f:advanced>
<f:optionalBlock name="mailer.useSMTPAuth" title="${%Use SMTP Authentication}" checked="${descriptor.smtpAuthUserName!=null}"
......
......@@ -32,7 +32,7 @@ THE SOFTWARE.
<f:entry title="${%Max # of concurrent polling}"
help="/help/triggers/SCMTrigger/concurrency.html">
<input class="setting-input" name="poll_scm_threads"
type="text" value="${h.ifThenElse(descriptor.pollingThreadCount==0,'',descriptor.pollingThreadCount)}"/>
type="text" value="${descriptor.pollingThreadCount==0 ? '' : descriptor.pollingThreadCount}"/>
</f:entry>
</f:section>
</j:if>
......
......@@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<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:i="jelly:fmt">
<td data="${h.ifThenElse(lsBuild==null,h.ifThenElse(lfBuild==null,'0',lfBuild.duration),lsBuild.duration)}">
<td data="${lsBuild.duration ?: lfBuild.duration ?: '0'}">
<j:choose>
<j:when test="${lsBuild!=null}">
${lsBuild.durationString}
......
......@@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<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:i="jelly:fmt">
<td data="${h.ifThenElse(lfBuild==null,'-',lfBuild.timestampString2)}">
<td data="${lfBuild.timestampString2 ?: '-'}">
<j:choose>
<j:when test="${lfBuild!=null}">
${lfBuild.timestampString}
......
......@@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<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:i="jelly:fmt">
<td data="${h.ifThenElse(lsBuild==null,'-',lsBuild.timestampString2)}">
<td data="${lsBuild.timestampString2 ?: '-'}">
<j:choose>
<j:when test="${lsBuild!=null}">
${lsBuild.timestampString}
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
-->
<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:i="jelly:fmt">
<j:set var="link" value="${it.baseUrl}/${build.number}/" />
<tr class="build-row ${h.ifThenElse(build.building,'transitive',null)}">
<tr class="build-row ${build.building ? 'transitive' : null}">
<td nowrap="nowrap">
<img width="16" height="16" src="${imagesURL}/16x16/${build.buildStatusUrl}" alt="${build.iconColor.description}" tooltip="${build.iconColor.description}" /><st:nbsp/>
#${build.number}
......@@ -53,7 +53,7 @@ THE SOFTWARE.
<t:buildProgressBar build="${build}"/>
</td><td style="padding:0">
<!-- Check ABORT permission for Project, Admin permission otherwise -->
<j:if test="${h.ifThenElse(empty(it.owner.ABORT),h.hasPermission(app.ADMINISTER),it.owner.hasPermission(it.owner.ABORT))}">
<j:if test="${empty(it.owner.ABORT) ? h.hasPermission(app.ADMINISTER) : it.owner.hasPermission(it.owner.ABORT)}">
<a href="${link}stop"><img src="${imagesURL}/16x16/stop.gif" alt="[cancel]"/></a>
</j:if>
</td></tr>
......@@ -61,7 +61,7 @@ THE SOFTWARE.
</td></tr>
</j:if>
<j:if test="${!empty build.description}">
<tr class="${h.ifThenElse(build.building,'transitive',null)}">
<tr class="${build.building ? 'transitive' : null}">
<td></td>
<td style="padding:0;white-space:normal">
${build.truncatedDescription}
......
......@@ -53,7 +53,7 @@ THE SOFTWARE.
</st:documentation>
<j:set var="targetType" value="${h.defaulted(attrs.targetType,it.class)}"/>
<j:set var="instances" value="${h.ifThenElse(attrs.instances!=null,attrs.instances,instance[field])}"/>
<j:set var="instances" value="${attrs.instances ?: instance[field]}"/>
<f:section title="${attrs.title}" name="${h.defaulted(attrs.field,attrs.name)}">
<j:if test="${attrs.field!=null}">
......
......@@ -53,7 +53,7 @@ THE SOFTWARE.
<f:radioBlock name="${varName}" help="${d.helpFile}" value="${loop.index}"
title="${d.displayName}" checked="${instance.descriptor==d}">
<j:set var="descriptor" value="${d}" />
<j:set var="instance" value="${h.ifThenElse(instance.descriptor==d,instance,null)}" />
<j:set var="instance" value="${instance.descriptor==d?instance:null}" />
<st:include from="${d}" page="${d.configPage}" optional="true" />
</f:radioBlock>
</j:forEach>
......
......@@ -75,7 +75,7 @@ THE SOFTWARE.
</d:taglib>
<j:set var="targetType" value="${h.defaulted(attrs.targetType,it.class)}"/>
<div class="hetero-list-container ${h.ifThenElse(attrs.hasHeader!=null,'with-drag-drop','')}">
<div class="hetero-list-container ${attrs.hasHeader!=null?'with-drag-drop':''}">
<!-- display existing items -->
<j:forEach var="i" items="${attrs.items}">
<j:set var="descriptor" value="${i.descriptor}" />
......
......@@ -33,7 +33,7 @@ THE SOFTWARE.
If true, the option value appears as selected.
</st:attribute>
</st:documentation>
<option value="${attrs.value}" selected="${h.ifThenElse(attrs.selected,'true',null)}">
<option value="${attrs.value}" selected="${attrs.selected?'true':null}">
<d:invokeBody/>
</option>
</j:jelly>
\ No newline at end of file
......@@ -48,7 +48,7 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>
<f:prepareDatabinding />
<input class="setting-input ${h.ifThenElse(attrs.checkUrl!=null,'validated','')}"
<input class="setting-input ${attrs.checkUrl!=null?'validated':''}"
name ="${h.defaulted(attrs.name,'_.'+attrs.field)}"
value="${h.defaulted(attrs.value,instance[attrs.field])}"
id="${attrs.id}"
......
......@@ -28,4 +28,4 @@ THE SOFTWARE.
Note that safari doesn't support onchange.
-->
<input type="radio" name="${attrs.name}" onclick="${attrs.onclick}" id="${attrs.id}" value="${attrs.value}"
checked="${h.ifThenElse(attrs.checked,'true',null)}"/>
\ No newline at end of file
checked="${attrs.checked?'true':null}"/>
\ No newline at end of file
......@@ -52,7 +52,7 @@ THE SOFTWARE.
<tr id="rb_s${rb_id}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<td colspan="3">
<input type="radio" name="${name}" value="${value}"
id="Rb${rb_id}" checked="${h.ifThenElse(checked,'true',null)}" />
id="Rb${rb_id}" checked="${checked?'true':null}" />
<st:nbsp/>
<label for="Rb${rb_id}">${title}</label>
</td>
......
......@@ -101,7 +101,7 @@ THE SOFTWARE.
<j:set var="descriptor" value="${descriptor.getPropertyType(field).itemTypeDescriptor}" />
</j:when>
<j:otherwise>
<j:set var="name" value="${h.ifThenElse(attrs.name!=null,attrs.name,attrs.var)}"/>
<j:set var="name" value="${attrs.name?:attrs.var}"/>
</j:otherwise>
</j:choose>
......
......@@ -44,7 +44,7 @@ THE SOFTWARE.
<j:otherwise>
<j:set var="id" value="${h.generateId()}" />
<j:set var="head" value="rowGroupStart${id}"/>
<j:set var="ref" value="${h.ifThenElse(attrs.ref!=null, attrs.ref, head)}"/>
<j:set var="ref" value="${attrs.ref?:head}"/>
<tr id="${head}" style="display:none" name="${attrs.name}" />
<d:invokeBody />
......
......@@ -52,7 +52,7 @@ THE SOFTWARE.
<f:prepareDatabinding />
<textarea id="${attrs.id}" style="${attrs.style}"
name ="${h.defaulted(attrs.name,'_.'+attrs.field)}"
class="setting-input ${h.ifThenElse(checkUrl!=null,'validated','')}"
class="setting-input ${checkUrl!=null?'validated':''}"
checkUrl="${checkUrl}"
rows="${h.determineRows(attrs.value)}">
<st:out value="${h.defaulted(attrs.value,instance[attrs.field])}" />
......
......@@ -49,7 +49,7 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>
<f:prepareDatabinding />
<input class="setting-input ${h.ifThenElse(attrs.checkUrl!=null,'validated','')}"
<input class="setting-input ${attrs.checkUrl!=null?'validated':''}"
name ="${h.defaulted(attrs.name,'_.'+attrs.field)}"
value="${h.defaulted(attrs.value,instance[attrs.field])}"
id="${attrs.id}"
......
......@@ -31,13 +31,13 @@ THE SOFTWARE.
<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">
<j:set var="buildHealth" value="${job.buildHealth}"/>
<j:if test="${td}"><j:set var="useTdElement" value="x"/></j:if>
<x:element name="${h.ifThenElse(useTdElement!=null,'td','div')}">
<x:element name="${useTdElement!=null?'td':'div'}">
<x:attribute name="data">${buildHealth.score}</x:attribute>
<x:attribute name="class">healthReport</x:attribute>
<x:attribute name="onmouseover">this.className='healthReport hover';return true;
</x:attribute>
<x:attribute name="onmouseout">this.className='healthReport';return true;</x:attribute>
<a href="${h.ifThenElse(empty(link),'#',link)}" style="${attrs.style}">
<a href="${empty(link)?'#':link}" style="${attrs.style}">
<img src="${rootURL}${buildHealth.getIconUrl(iconSize)}"
alt="${buildHealth.score}%"/>
</a>
......
......@@ -45,7 +45,7 @@ THE SOFTWARE.
#<!-- -->${number}
</j:when>
<j:otherwise>
<a href="${h.ifThenElse(attrs.href!=null,href,rootURL+'/'+r.url)}">
<a href="${attrs.href ?: rootURL+'/'+r.url}">
<img src="${imagesURL}/16x16/${r.buildStatusUrl}"
alt="${r.iconColor.description}"/>${jobName_}#<!-- -->${number}</a>
</j:otherwise>
......
......@@ -39,7 +39,7 @@ THE SOFTWARE.
</div>
<l:hasPermission permission="${permission}">
<div align="right"><a href="editDescription" onclick="${h.ifThenElse(h.isAutoRefresh(request), null, 'return replaceDescription();')}">
<div align="right"><a href="editDescription" onclick="${h.isAutoRefresh(request) ? null : 'return replaceDescription();'}">
<img src="${imagesURL}/16x16/notepad.gif" alt="" />
<j:choose>
<j:when test="${empty(it.description)}">
......
......@@ -37,7 +37,7 @@ THE SOFTWARE.
<j:if test="${!c.acceptingTasks}"> (${%suspended})</j:if>
</d:tag>
</d:taglib>
<j:set var="computers" value="${h.ifThenElse(attrs.computers!=null, attrs.computers, app.computers)}" />
<j:set var="computers" value="${attrs.computers?:app.computers}" />
<l:pane title="&lt;a href='${rootURL}/computer/'>${%Build Executor Status}&lt;/a>" width="3" id="executors">
<j:forEach var="c" items="${computers}" varStatus="cloop">
<j:choose>
......@@ -111,7 +111,7 @@ THE SOFTWARE.
<!-- schedule updates only for the full page reload -->
<j:if test="${ajax==null and !h.isAutoRefresh(request) and h.hasPermission(app.READ)}">
<script defer="defer">
refreshPart('executors',"${h.ifThenElse(h.hasView(it,'ajaxExecutors'),'.',rootURL)}/ajaxExecutors");
refreshPart('executors',"${h.hasView(it,'ajaxExecutors')?'.':rootURL}/ajaxExecutors");
</script>
</j:if>
</l:pane>
......
......@@ -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 ${h.ifThenElse(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="${h.ifThenElse(attrs.href!=null,'cursor:pointer',null)}">
<j:choose>
<j:when test="${pos lt 0}">
<!-- style sheet will fill in the progress bar image -->
......
......@@ -65,7 +65,7 @@ THE SOFTWARE.
});
}
</j:if>
$$("${idref}").fetchedBytes = ${h.ifThenElse(empty(startOffset),0,startOffset)};
$$("${idref}").fetchedBytes = ${empty(startOffset)?0:startOffset};
fetchNext($$("${idref}"),"${href}");
</script>
</j:jelly>
......@@ -30,7 +30,7 @@ THE SOFTWARE.
<j:set var="descriptor" value="${scms[idx]}" />
<j:set var="scmd" value="${descriptor}" /><!-- backward compatibility with <1.238 -->
<f:radioBlock name="scm" value="${idx}" title="${scmd.displayName}" checked="${it.scm.descriptor==scmd}">
<j:set var="instance" value="${h.ifThenElse(it.scm.descriptor==descriptor, it.scm, null)}"/>
<j:set var="instance" value="${it.scm.descriptor==descriptor ? it.scm : null}"/>
<j:set var="scm" value="${instance}" /><!-- backward compatibility with <1.238 -->
<st:include from="${scmd}" page="${scmd.configPage}"/>
</f:radioBlock>
......
......@@ -49,7 +49,7 @@ THE SOFTWARE.
<d:invokeBody/>
<!-- project list -->
<table id="projectstatus" class="sortable pane bigtable"
style="${h.ifThenElse(showViewTabs!=null,'margin-top:0px; border-top: none;',null)}">
style="${showViewTabs!=null?'margin-top:0px; border-top: none;':null}">
<tr style="border-top: 0px;">
<j:forEach var="col" items="${columnExtensions}">
<st:include page="columnHeader.jelly" it="${col}" />
......
......@@ -38,7 +38,7 @@ THE SOFTWARE.
<!-- if nested view supports ajaxRows -->
<a href="#">
<img src="${imagesURL}/tree/plus.png" state="plus" width="14" height="14" alt="" class="fold-control treeview-fold-control"
url="${rootURL}/${v.url}/ajaxRows?depth=${h.ifThenElse(depth!=null,depth+1,1)}"/>
url="${rootURL}/${v.url}/ajaxRows?depth=${depth!=null?depth+1:1}"/>
<st:adjunct includes="lib.hudson.projectViewNested" />
</a>
</j:otherwise>
......
......@@ -32,7 +32,7 @@ THE SOFTWARE.
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:set var="lsBuild" value="${job.lastSuccessfulBuild}"/>
<j:set var="lfBuild" value="${job.lastFailedBuild}"/>
<tr class="${h.ifThenElse(job.disabled,'disabledJob',null)}">
<tr class="${job.disabled?'disabledJob':null}">
<j:forEach var="col" items="${columnExtensions}">
<st:include page="column.jelly" it="${col}" />
</j:forEach>
......
......@@ -58,7 +58,7 @@ THE SOFTWARE.
<tr>
<td class="pane" width="100%" tooltip="${item.why}" style="white-space: normal;">
<j:set var="stuck" value="${item.isStuck()}" />
<a href="${rootURL}/${item.task.url}" style="${h.ifThenElse(stuck,'color:#ef2929',null)}">
<a href="${rootURL}/${item.task.url}" style="${stuck?'color:#ef2929':null}">
${item.task.fullDisplayName}
<j:if test="${stuck}"> (${%appears to be stuck})</j:if>
</a>
......@@ -75,7 +75,7 @@ THE SOFTWARE.
<!-- schedule updates only for the full page reload -->
<j:if test="${ajax==null and !h.isAutoRefresh(request) and h.hasPermission(app.READ)}">
<script defer="defer">
refreshPart('buildQueue',"${h.ifThenElse(h.hasView(it,'ajaxBuildQueue'),'.',rootURL)}/ajaxBuildQueue");
refreshPart('buildQueue',"${h.hasView(it,'ajaxBuildQueue')?'.':rootURL}/ajaxBuildQueue");
</script>
</j:if>
</l:pane>
......
......@@ -32,5 +32,5 @@ THE SOFTWARE.
so we try not to make the secondary icons look bigger than the icon.
we want the user's eyes to go to balls, not the clock.
-->
<j:set scope="parent" var="subIconSize" value="${h.ifThenElse(iconSize=='32x32','24x24',iconSize)}"/>
<j:set scope="parent" var="subIconSize" value="${iconSize=='32x32'?'24x24':iconSize}"/>
</j:jelly>
\ No newline at end of file
......@@ -45,12 +45,12 @@ THE SOFTWARE.
<tr>
<td>
<a href="${attrs.href}">
<img src="${h.ifThenElse(icon.startsWith('/'), rootURL+icon, imagesURL+'/48x48/'+icon)}"
<img src="${icon.startsWith('/') ? rootURL+icon : imagesURL+'/48x48/'+icon}"
alt="" width="48" height="48" style="margin-right:1em" />
</a>
</td>
<td style="vertical-align:middle">
<a href="${h.ifThenElse(attrs.iconOnly==null,attrs.href,null)}">
<a href="${attrs.iconOnly==null ? attrs.href : null}">
<d:invokeBody />
</a>
</td>
......
......@@ -72,7 +72,7 @@ THE SOFTWARE.
<j:otherwise>
<div class="task">
<a href="${href}" onclick="${attrs.onclick}">
<img width="24" height="24" style="margin: 2px;" alt="" src="${rootURL}${h.ifThenElse(icon.startsWith('images/'),h.resourcePath,'')}/${icon}"/>
<img width="24" height="24" style="margin: 2px;" alt="" src="${rootURL}${icon.startsWith('images/') ? h.resourcePath : '')}/${icon}"/>
</a>
<st:nbsp />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册