提交 4b0ab03c 编写于 作者: H Harald Albers

Merge pull request #1326 from albers/missing-td

fixed broken HTML tables, added Jelly tag for help links
......@@ -70,5 +70,6 @@ THE SOFTWARE.
</script>
</j:if>
</td>
<td/>
</tr>
</j:jelly>
......@@ -28,7 +28,7 @@ THE SOFTWARE.
Full-width space in the form table that can be filled with arbitrary HTML.
</st:documentation>
<tr>
<td colspan="3">
<td colspan="4">
<d:invokeBody />
</td>
</tr>
......
......@@ -32,5 +32,6 @@ THE SOFTWARE.
<td class="setting-description">
<d:invokeBody />
</td>
<td />
</tr>
</j:jelly>
\ No newline at end of file
......@@ -51,13 +51,7 @@ THE SOFTWARE.
<d:invokeBody/>
</select>
</td>
<j:if test="${attrs.help!=null}">
<td class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.png"
alt="Help for feature: ${title}"
height="16" width="16"/></a>
</td>
</j:if>
<f:helpLink url="${attrs.help}" featureName="${title}"/>
</tr>
<!-- generate the actual form entries -->
......
......@@ -72,14 +72,10 @@ THE SOFTWARE.
<td class="setting-main">
<d:invokeBody />
</td>
<j:if test="${attrs.help!=null}">
<td class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.png" alt="Help for feature: ${title}" height="16" width="16" /></a>
</td>
</j:if>
<f:helpLink url="${attrs.help}" featureName="${title}"/>
</tr>
<!-- used to display the form validation error -->
<tr class="validation-error-area"><td colspan="2" /><td /></tr>
<tr class="validation-error-area"><td colspan="2" /><td /><td /></tr>
<j:if test="${!empty(attrs.description)}">
<f:description>
<j:out value="${description}"/>
......
<!--
The MIT License
Copyright (c) 2014, Harald Albers
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.
-->
<?jelly escape-by-default='true'?>
<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">
<st:documentation>
Outputs an help link for a &lt;f:form> item if help is available or
a spacer if none is available.
The help link is rendered as a table cell with an (?) icon.
If the user clicks it, the content of the HTML fragment at the given URL
is renderd in the area designated as &lt;f:helpArea> by the caller,
usually in a row beneath the item with help.
The alternative spacer is just an empty table cell.
This tag was introduced to ensure that the space reserved for help items
is consistent over the UI whether or not help exists.
@since XXX
<st:attribute name="url">
URL to the HTML page. Optional. If not given, no help icon is displayed.
The URL should return a UTF-8 encoded HTML fragment wrapped in a &lt;div> tag.
The URL is interpreted to be rooted at the context path of Jenkins,
so it's normally something like "/plugin/foobar/help/abc.html".
</st:attribute>
<st:attribute name="featureName">
Name of the feature described by the help text, used for constructing the
icon's alt attribute. Optional.
</st:attribute>
</st:documentation>
<j:choose>
<j:when test="${attrs.url!=null}">
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%[Help]'}" />
<td class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${attrs.url}"><img src="${imagesURL}/16x16/help.png" alt="${altText}" height="16" width="16"/></a>
</td>
</j:when>
<j:otherwise>
<td class="setting-no-help" />
</j:otherwise>
</j:choose>
</j:jelly>
Help\ for\ feature\:=Hilfe f\u00FCr\:
[Help]=[Hilfe]
......@@ -81,11 +81,7 @@ THE SOFTWARE.
<b>${descriptor.displayName}</b>
</div>
</td>
<j:if test="${help!=null}">
<td>
<a href="#" class="help-button" helpURL="${rootURL}${help}"><img src="${imagesURL}/16x16/help.png" alt="[help]" height="16" width="16"/></a>
</td>
</j:if>
<f:helpLink url="${help}"/>
</tr>
<!-- TODO: help support is unintuitive; people should be able to see help from drop-down menu -->
<j:if test="${help!=null}">
......
......@@ -71,11 +71,7 @@ THE SOFTWARE.
<f:checkbox name="${attrs.name}" onclick="javascript:updateOptionalBlock(this,true)"
negative="${attrs.negative}" checked="${attrs.checked}" field="${attrs.field}" title="${title}" />
</td>
<j:if test="${attrs.help!=null}">
<td>
<a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.png" alt="Help for feature: ${title}" height="16" width="16" /></a>
</td>
</j:if>
<f:helpLink url="${attrs.help}" featureName="${title}"/>
</tr>
<j:if test="${attrs.help!=null}">
<f:helpArea />
......
......@@ -62,11 +62,7 @@ THE SOFTWARE.
${title}
</label>
</td>
<j:if test="${attrs.help!=null}">
<td class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${help}"><img src="${imagesURL}/16x16/help.png" alt="Help for feature: ${title}" height="16" width="16" /></a>
</td>
</j:if>
<f:helpLink url="${help}" featureName="${title}" />
</tr>
<j:if test="${attrs.help!=null}">
<f:helpArea />
......
......@@ -332,6 +332,9 @@ pre.console {
width: 16px;
vertical-align: middle;
}
.setting-no-help {
width: 16px;
}
.setting-input {
width: 100%;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册