diff options
| author | Xavier Morel <xmo@openerp.com> | 2014-09-09 09:17:32 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2014-10-06 19:13:43 +0200 |
| commit | 494dcbd0e3ee4370e3c4a5ac6635acf86f0d7481 (patch) | |
| tree | b0b84286216ee50d8f4480292435cf5afc64be22 /addons/web/static/lib/qweb/qweb-test-extend.xml | |
| parent | bed6b01c53b520591e6f693dbb5c25cc5b772bbc (diff) | |
[IMP] qweb doc, tests
* document qweb based (mostly) on JS version
* convert JS qweb tests to (mostly) language-independent XML so they can be
used for JS and Python implementations
* add some more tests (e.g. precedence between t-value and body in t-set)
* remove ``t-import``
* fix parity in foreach(dict) (and rename some variables to make array and
object versions more similar)
Diffstat (limited to 'addons/web/static/lib/qweb/qweb-test-extend.xml')
| -rw-r--r-- | addons/web/static/lib/qweb/qweb-test-extend.xml | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/addons/web/static/lib/qweb/qweb-test-extend.xml b/addons/web/static/lib/qweb/qweb-test-extend.xml index 35181eb8ee9..007caefe383 100644 --- a/addons/web/static/lib/qweb/qweb-test-extend.xml +++ b/addons/web/static/lib/qweb/qweb-test-extend.xml @@ -1,32 +1,37 @@ <templates> -<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> + <!-- 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> + <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> |
