As a stable fix, to not touch XML templates and break existing translations, the ⌙ character was automatically replaced by └ which makes more sense for the usecase and should work properly in all browsers. The ⌙ character is actually rendered mirrored on Windows 11 Chrome (and others) as the font used for those unicode characters is left to the browser. We could force a font of our own but it's probably not worth it. A better solution with a SVG or CSS solution has to be done in master. That would unify the look of the symbol across all browsers and also prevent special characters to be placed in translations. With this forward-port commit, we'll start first by using └ via a CSS rule. Three new classes have been created: o_we_sublevel_1, o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget automatically adds the └ character. Then choosing 1, 2 or 3 controls the indentation, which was previously controlled by placing the   HTML entity directly inside strings. This commit also takes the opportunity to fix some of those level indentations (sometimes 2 was used instead of 1 or 1 was used instead of 2, etc) and also review some related labels. closes odoo/odoo#97361 X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
68 lines
3.8 KiB
XML
68 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="website.s_dynamic_snippet_template">
|
|
<section t-attf-class="#{snippet_name} #{snippet_classes} s_dynamic d-none pt32 pb32">
|
|
<div class="container o_not_editable">
|
|
<div class="css_non_editable_mode_hidden">
|
|
<div class="missing_option_warning alert alert-info rounded-0 fade show d-none d-print-none">
|
|
Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.<br/>
|
|
</div>
|
|
</div>
|
|
<div class="dynamic_snippet_template"/>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
<template id="s_dynamic_snippet" name="Dynamic Snippet">
|
|
<t t-call="website.s_dynamic_snippet_template">
|
|
<t t-set="snippet_name" t-value="'s_dynamic_snippet'"/>
|
|
</t>
|
|
</template>
|
|
<template id="website.s_dynamic_snippet_options_template">
|
|
<div t-attf-data-js="#{snippet_name}" t-attf-data-selector="#{snippet_selector}" data-no-preview="true">
|
|
<we-select string="Filter" data-name="filter_opt" data-attribute-name="filterId" data-no-preview="true">
|
|
</we-select>
|
|
<we-select string="Template" data-name="template_opt" data-attribute-name="templateKey" data-no-preview="true">
|
|
</we-select>
|
|
<we-select string="Fetched elements" data-name="number_of_records_opt" data-attribute-name="numberOfRecords" data-no-preview="true">
|
|
<we-button t-foreach="range(1, 17)" t-as="value" t-att-data-select-data-attribute="value" t-esc="value"/>
|
|
</we-select>
|
|
<we-title class="mt-2 o_grouping_message"><t t-esc="grouping_message"/></we-title>
|
|
<we-select string="Desktop" class="o_we_sublevel_1" data-name="number_of_elements_opt" data-attribute-name="numberOfElements" data-no-preview="true">
|
|
<we-button data-select-data-attribute="1">1</we-button>
|
|
<we-button data-select-data-attribute="2">2</we-button>
|
|
<we-button data-select-data-attribute="3">3</we-button>
|
|
<we-button data-select-data-attribute="4">4</we-button>
|
|
<we-button data-select-data-attribute="6">6</we-button>
|
|
</we-select>
|
|
<we-select string="Mobile" class="o_we_sublevel_1" data-name="number_of_elements_small_devices_opt" data-attribute-name="numberOfElementsSmallDevices" data-no-preview="true">
|
|
<we-button data-select-data-attribute="1">1</we-button>
|
|
<we-button data-select-data-attribute="2">2</we-button>
|
|
<we-button data-select-data-attribute="3">3</we-button>
|
|
</we-select>
|
|
<t t-out="0"/>
|
|
</div>
|
|
</template>
|
|
<template id="s_dynamic_snippet_options" inherit_id="website.snippet_options">
|
|
<xpath expr="." position="inside">
|
|
<t t-call="website.s_dynamic_snippet_options_template">
|
|
<t t-set="snippet_name" t-value="'dynamic_snippet'"/>
|
|
<t t-set="snippet_selector" t-value="'.s_dynamic_snippet'"/>
|
|
<t t-set="grouping_message">Items per row</t>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<record id="website.s_dynamic_snippet_000_scss" model="ir.asset">
|
|
<field name="name">Dynamic snippet 000 SCSS</field>
|
|
<field name="bundle">web.assets_frontend</field>
|
|
<field name="path">website/static/src/snippets/s_dynamic_snippet/000.scss</field>
|
|
</record>
|
|
|
|
<record id="website.s_dynamic_snippet_000_js" model="ir.asset">
|
|
<field name="name">Dynamic snippet 000 JS</field>
|
|
<field name="bundle">web.assets_frontend</field>
|
|
<field name="path">website/static/src/snippets/s_dynamic_snippet/000.js</field>
|
|
</record>
|
|
|
|
</odoo>
|