Skip to content

Commit 908923b

Browse files
committed
[REF] website: convert so_width common options to owl
task-3850413
1 parent f40ca0d commit 908923b

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

addons/website/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
'website/static/src/js/editor/snippets.options.xml',
244244
'website/static/src/js/editor/snippets.options.legacy.js',
245245
'website/static/src/js/editor/snippets.registry.js',
246+
'website/static/src/js/editor/options/common/*',
246247
'website/static/src/snippets/s_facebook_page/options.js',
247248
'website/static/src/snippets/s_facebook_page/options.xml',
248249
'website/static/src/snippets/s_image/options.js',

addons/website/static/src/js/editor/snippets.options.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4571,6 +4571,11 @@ registerWebsiteOption("horizontal_alignment", {
45714571
selector: ".s_share, .s_text_highlight, .s_social_media",
45724572
});
45734573

4574+
registerWebsiteOption("block_width_option", {
4575+
template: "website.block_width_option",
4576+
selector: ".s_alert, .s_blockquote, .s_text_highlight",
4577+
});
4578+
45744579
registerWebsiteOption("vertical_alignment", {
45754580
class: vAlignment,
45764581
template: "website.vertical_alignment_option",

addons/website/static/src/js/editor/snippets.options.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@
233233
<WeButton class="'fa fa-fw fa-align-right'" tooltip.translate="Right" selectClass="'text-end'"/>
234234
</WeButtonGroup>
235235
</t>
236+
<t t-name="website.block_width_option">
237+
<WeSelect title.translate="Width">
238+
<WeButton selectClass="'w-25'">25%</WeButton>
239+
<WeButton selectClass="'w-50'">50%</WeButton>
240+
<WeButton selectClass="'w-75'">75%</WeButton>
241+
<WeButton selectClass="'w-100'" name="'so_width_100'">100%</WeButton>
242+
</WeSelect>
243+
</t>
236244

237245
<!-- Header - Borders & Shadows -->
238246
<t t-name="website.HeaderBox">

addons/website/views/snippets/snippets.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,6 @@
443443

444444
<xpath expr="." position="inside">
445445

446-
<div id="so_width" data-selector=".s_alert, .s_blockquote, .s_text_highlight">
447-
<we-select string="Width">
448-
<we-button data-select-class="w-25">25%</we-button>
449-
<we-button data-select-class="w-50">50%</we-button>
450-
<we-button data-select-class="w-75">75%</we-button>
451-
<we-button data-select-class="w-100" data-name="so_width_100">100%</we-button>
452-
</we-select>
453-
</div>
454-
455446
<div id="so_block_align" data-selector=".s_alert, .s_card, .s_blockquote, .s_text_highlight">
456447
<we-button-group string="Alignment" data-dependencies="!so_width_100">
457448
<we-button class="fa fa-fw fa-align-left" title="Left" data-select-class="me-auto"/>

0 commit comments

Comments
 (0)