diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/lib/qweb/qweb-test-extend.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/web/static/lib/qweb/qweb-test-extend.xml')
| -rw-r--r-- | addons/web/static/lib/qweb/qweb-test-extend.xml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/addons/web/static/lib/qweb/qweb-test-extend.xml b/addons/web/static/lib/qweb/qweb-test-extend.xml new file mode 100644 index 00000000..f8a24c4e --- /dev/null +++ b/addons/web/static/lib/qweb/qweb-test-extend.xml @@ -0,0 +1,62 @@ +<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="ul" t-operation="attributes"><attribute name="title" value="Main Title" /></t> + </t> + <t t-extend="jquery-extend"> + <t t-jquery="ul" t-operation="attributes"><attribute name="name">main-ul</attribute></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" title="Main Title" name="main-ul"><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[ + <hr/><ul class="main" title="Main Title" name="main-ul"><li>1</li><li>2</li><li>3</li><li>[[cloned template]]</li></ul><footer><b>[[end]]</b></footer> +]]></result> + + + <t t-name="a"> + <div><span>Hi</span></div> + </t> + <t t-name="b" t-extend="a"> + <t t-jquery="span" t-operation="after"><i>World</i></t> + </t> + <t t-name="c" t-extend="b"> + <t t-jquery="span" t-operation="replace"><span>Hello</span></t> + </t> + <result id="a"><![CDATA[ + <div><span>Hi</span></div> +]]></result> + <result id="b"><![CDATA[ + <div><span>Hi</span><i>World</i></div> +]]></result> + <result id="c"><![CDATA[ + <div><span>Hello</span><i>World</i></div> +]]></result> +</templates> |
