File: qweb-test-extend.xml

package info (click to toggle)
oca-core 11.0.20180730-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 509,684 kB
  • sloc: xml: 258,806; python: 164,081; sql: 217; sh: 92; makefile: 16
file content (37 lines) | stat: -rw-r--r-- 1,292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<templates>
    <!-- js-only -->
    <t t-name="jquery-extend">
        <ul><li>one</li></ul>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="ul" t-operation="append"><li>3</li></t>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="ul li:first-child" t-operation="replace"><li>2</li></t>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="ul" t-operation="prepend"><li>1</li></t>
        <t t-jquery="ul" t-operation="before"><hr/></t>
        <t t-jquery="ul" t-operation="after"><hr/></t>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="ul">this.attr('class', 'main');</t>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="hr:eq(1)" t-operation="replace"><footer></footer></t>
    </t>
    <t t-extend="jquery-extend">
        <t t-jquery="footer" t-operation="inner"><b>[[end]]</b></t>
    </t>
    <result id="jquery-extend"><![CDATA[
    <hr/><ul class="main"><li>1</li><li>2</li><li>3</li></ul><footer><b>[[end]]</b></footer>
]]></result>

    <t t-name="jquery-extend-clone" t-extend="jquery-extend">
        <t t-jquery="ul" t-operation="append"><li>[[cloned template]]</li></t>
    </t>
    <result id="jquery-extend-clone"><![CDATA[
    <ul><li>one</li><li>[[cloned template]]</li></ul>
]]></result>

</templates>