PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/hudson-core/src/main/resources/lib/form/rowSet.jelly

http://github.com/hudson/hudson
Unknown | 57 lines | 50 code | 7 blank | 0 comment | 0 complexity | 94c9f7d4af4fb81104d40f5f0d4378db MD5 | raw file
 1<!--
 2The MIT License
 3
 4Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
 5
 6Permission is hereby granted, free of charge, to any person obtaining a copy
 7of this software and associated documentation files (the "Software"), to deal
 8in the Software without restriction, including without limitation the rights
 9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22THE SOFTWARE.
23-->
24
25<?jelly escape-by-default='true'?>
26<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">
27  <st:documentation>
28    Adds @nameRef to all table rows inside this tag, so that when the form is submitted,
29    it gets grouped in one JSON object.
30
31    <st:attribute name="name">
32      if the group head is not available outside, use this attribute to specify the name.
33      @name and @ref are mutually exclusive.
34    </st:attribute>
35    <st:attribute name="ref">
36      id of the thing that serves as the group head, if that's available separately
37    </st:attribute>
38    <st:attribute name="isPropertyOverridden">
39      if present and true - value is overridden
40    </st:attribute>
41  </st:documentation>
42
43  <j:if test="${attrs.isPropertyOverridden==null}">
44    <j:set target="${attrs}" property="isPropertyOverridden" value="false"/>
45  </j:if>
46  <j:choose>
47    <j:when test="${attrs.ref==null and attrs.name==null}">
48      <!-- noop -->
49      <d:invokeBody />
50    </j:when>
51    <j:otherwise>
52      <tr ref="${attrs.ref}" class="row-set-start ${attrs.isPropertyOverridden? 'modified': 'original'}" style="display:none" name="${attrs.name}" />
53      <d:invokeBody />
54      <tr class="row-set-end" />
55    </j:otherwise>
56  </j:choose>
57</j:jelly>