[IMP] web_editor: add a new string attribute on snippet option

This commit introduces a new way to set the title of an option section
in the customize panel. The title can now be filled in a new "string"
attribute in the template of an option.

See merge commit for more information.

task-2710582
This commit is contained in:
Benjamin Vray
2022-06-24 10:28:05 +02:00
committed by qsm-odoo
parent 2eef2b5430
commit 1216cea321
2 changed files with 4 additions and 1 deletions
@@ -759,6 +759,9 @@ var SnippetEditor = Widget.extend({
if (!val.selector.is(this.$target)) {
return;
}
if (val.data.string) {
$optionsSection[0].querySelector('we-title > span').textContent = val.data.string;
}
if (val['drop-near']) {
this.selectorSiblings.push(val['drop-near']);
}
+1 -1
View File
@@ -222,7 +222,7 @@
/>
</div>
<div data-js="BackgroundShape" string="Shape"
<div data-js="BackgroundShape"
t-att-data-selector="selector"
t-att-data-exclude="exclude"
t-att-data-target="target">