diff options
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/lib/qweb/qweb-test-extend.xml | 21 | ||||
| -rw-r--r-- | addons/web/static/lib/qweb/qweb2.js | 1 |
2 files changed, 21 insertions, 1 deletions
diff --git a/addons/web/static/lib/qweb/qweb-test-extend.xml b/addons/web/static/lib/qweb/qweb-test-extend.xml index dfd0ec46940..f8a24c4ef8e 100644 --- a/addons/web/static/lib/qweb/qweb-test-extend.xml +++ b/addons/web/static/lib/qweb/qweb-test-extend.xml @@ -37,7 +37,26 @@ <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> + <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> diff --git a/addons/web/static/lib/qweb/qweb2.js b/addons/web/static/lib/qweb/qweb2.js index 2cfd2286cbc..d2a367f1c33 100644 --- a/addons/web/static/lib/qweb/qweb2.js +++ b/addons/web/static/lib/qweb/qweb2.js @@ -268,6 +268,7 @@ QWeb2.Engine = (function() { return this.tools.exception("Can't clone undefined template " + extend); } this.templates[name] = this.templates[extend].cloneNode(true); + this.extend_templates[name] = (this.extend_templates[extend] || []).slice(); extend = name; name = undefined; } |
