提交 dcf5f948 编写于 作者: K kohsuke

fixed #303.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2221 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b8de9d12
......@@ -7,14 +7,14 @@
TODO: support @checkUrl
-->
<j:jelly xmlns:j="jelly:core" xmlns:d="jelly:define">
<table border="0" style="width:100%" cellspacing="0" cellpadding="0">
<j:choose>
<j:when test="${h.isMultiline(attrs.value)}">
<!-- multiline text area to begin with -->
<textarea rows="8" class='setting-input' name='${attrs.name}'>${attrs.value}</textarea>
</j:when>
<j:otherwise>
<!-- single line textbox with expand button -->
<j:choose>
<j:when test="${h.isMultiline(attrs.value)}">
<!-- multiline text area to begin with -->
<textarea rows="8" class='setting-input' name='${attrs.name}'>${attrs.value}</textarea>
</j:when>
<j:otherwise>
<!-- single line textbox with expand button -->
<table border="0" style="width:100%" cellspacing="0" cellpadding="0">
<tr>
<td width="*">
<input class="setting-input" name="${attrs.name}" id="textarea.${attrs.name}"
......@@ -23,7 +23,7 @@
<input type="button" value="&#x25BC;" onclick="expandTextArea(this,'textarea.${attrs.name}')" />
</td>
</tr>
</j:otherwise>
</j:choose>
</table>
</table>
</j:otherwise>
</j:choose>
</j:jelly>
\ No newline at end of file
......@@ -274,7 +274,10 @@ function expandTextArea(button,id) {
button.style.display="none";
var field = document.getElementById(id);
var value = field.value.replace(/ +/g,'\n');
field.parentNode.parentNode.parentNode.parentNode.innerHTML =
var n = field;
while(n.tagName!="TABLE")
n = n.parentNode;
n.parentNode.innerHTML =
"<textarea rows=8 class='setting-input' name='"+field.name+"'>"+value+"</textarea>";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册