Files
design-themes/theme_test_custo/data/shapes.xml
T
Mathieu (mano) fb611453ee [IMP] theme_test_custo: xpath new shape UI
This commit fixes the xpath that have been broken by the new
we-select-pager introducing a full height version of the shape UI in
the web_editor.

task-3266751

closes odoo/design-themes#653

Related: odoo/odoo#118253
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-12 11:17:43 +02:00

41 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Background Shape -->
<template id="snippet_options_background_options" inherit_id="website.snippet_options_background_options" name="Background Shape Custom Option">
<xpath expr="//we-select-pager[hasclass('o_we_bg_shape_menu')]/div/div[last()]/we-select-page[last()]" position="after">
<we-title>Custom Shapes</we-title>
<we-select-page string="Custom Shapes">
<we-button data-shape="theme_test_custo/hexagons/01" data-select-label="Hexagon 01"/>
<we-button data-shape="theme_test_custo/curves/01" data-select-label="Curve 01"/>
</we-select-page>
</xpath>
</template>
<record id="shape_hexagon_01" model="theme.ir.attachment">
<field name="name">Hexagon Shape 01</field>
<field name="key">theme_test_custo.shape_hexagon_01</field>
<field name="url">/web_editor/shape/illustration/hexagons/01.svg</field>
</record>
<record id="shape_curve_01" model="theme.ir.attachment">
<field name="name">Curve Shape 01</field>
<field name="key">theme_test_custo.shape_curve_01</field>
<field name="url">/web_editor/shape/illustration/curves/01.svg</field>
</record>
<!-- Image Shape -->
<template id="snippet_options" inherit_id="website.snippet_options" name="Image Shape Custom Option">
<xpath expr="//we-select-pager[@data-name='shape_img_opt']/div/div[last()]/we-select-page[last()]" position="after">
<we-title>Custom Shapes</we-title>
<we-select-page string="Custom Shapes">
<we-button data-set-img-shape="theme_test_custo/blob/01" data-select-label="Blob 01"/>
</we-select-page>
</xpath>
</template>
<record id="img_shape_blob_01" model="theme.ir.attachment">
<field name="name">Blob Shape 01</field>
<field name="key">theme_test_custo.img_shape_blob_01</field>
<field name="url">/web_editor/image_shape/blob/01.svg</field>
</record>
</odoo>