提交 b87b1f17 编写于 作者: K Kohsuke Kawaguchi

made the content type customizable

上级 c88698c0
......@@ -34,15 +34,23 @@ 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:s="/lib/form" xmlns:p="/lib/hudson/project">
<st:documentation>
Sets up the same 'global' variables that the l:layout tag does for content loaded by AJAX scripts.
<st:attribute name="contentType">
Content-type of the response page. This will be ignored if this tag is encountered while
evaluating a page that has called l:layout tag.
</st:attribute>
</st:documentation>
<j:choose>
<j:when test="${rootURL!=null}">
<!-- no envelope needed, since this is called during full HTML rendering. -->
<!-- no envelope needed, since this is called during full HTML rendering. Don't overwrite content-type either -->
<d:invokeBody/>
</j:when>
<j:otherwise>
<!-- called to generate partial HTML. set up HTML headers and etc -->
<!-- copied from layout.jelly -->
<st:contentType value="text/html;charset=UTF-8" />
<st:contentType value="${attrs.contentType?:'text/html;charset=UTF-8'}" />
<j:new var="h" className="hudson.Functions" /><!-- instead of JSP functions -->
${h.initPageVariables(context)}
<j:set var="ajax" value="true"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册