[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:
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user