提交 fdc1982c 编写于 作者: K Kevin Burke

Pass through task-link CSS class to confirmationLink dialog

上级 617281f8
......@@ -37,9 +37,12 @@ THE SOFTWARE.
<st:attribute name="message" use="required">
A confirmation dialog message.
</st:attribute>
<st:attribute name="class">
A CSS class to use to style the link.
</st:attribute>
</st:documentation>
<j:set var="id" value="${h.generateId()}"/>
<a href="#" onclick="confirmPOST_${id}(${post ?: 'false'}, '${attrs.href}', '${h.jsStringEscape(message)}')"><d:invokeBody/></a>
<a href="#" class="${class}" onclick="confirmPOST_${id}(${post ?: 'false'}, '${attrs.href}', '${h.jsStringEscape(message)}')"><d:invokeBody/></a>
<script>
function confirmPOST_${id}(post, href, message) {
if (confirm(message)) {
......
......@@ -142,7 +142,7 @@ THE SOFTWARE.
<j:choose>
<j:when test="${requiresConfirmation and not attrs.onClick}">
<l:confirmationLink href="${href}" post="${post}" message="${confirmationMessage ?: title}">
<l:confirmationLink class="task-link" href="${href}" post="${post}" message="${confirmationMessage ?: title}">
<j:choose>
<j:when test="${match}">
<b>${title}</b>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册