[IMP] web_editor: page options activated on click on the customize tab
With this commit, clicking on the "customize" tab automatically activates the page options (if there are any). This commit also replaces the name of the "style" tab by naming it "customize". task-2710582
This commit is contained in:
@@ -2948,7 +2948,18 @@ var SnippetsMenu = Widget.extend({
|
||||
if (!ev.currentTarget.classList.contains('active')) {
|
||||
this._activateSnippet(false);
|
||||
this._mutex.exec(() => {
|
||||
this._activateEmptyOptionsTab();
|
||||
let $pageOptionsTarget = $();
|
||||
let i = 0;
|
||||
const pageOptions = this.templateOptions.filter(template => template.data.pageOptions);
|
||||
while (!$pageOptionsTarget.length && i < pageOptions.length) {
|
||||
$pageOptionsTarget = pageOptions[i].selector.all();
|
||||
i++;
|
||||
}
|
||||
if ($pageOptionsTarget.length) {
|
||||
this._activateSnippet($pageOptionsTarget);
|
||||
} else {
|
||||
this._activateEmptyOptionsTab();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<span>Blocks</span>
|
||||
</button>
|
||||
<button type="button" tabindex="2" class="o_we_customize_snippet_btn text-uppercase">
|
||||
<span>Style</span>
|
||||
<span>Customize</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user