diff options
| author | Benoit Socias <bso@odoo.com> | 2020-11-23 12:55:40 +0000 |
|---|---|---|
| committer | Benoit Socias <bso@odoo.com> | 2020-12-04 15:20:19 +0000 |
| commit | 65b1b61ad53c97d07a93bf0b72e239d19fc270a5 (patch) | |
| tree | b3b2f34e07b830457d4135e6c9affef3984952e2 /addons/website/static/src/js | |
| parent | d8e816f95e2c51071415a3d4a9171d7014bb7b1c (diff) | |
[IMP] website, web_tour: have steps to select shape or color
Before this commit the theme tours had no step during the shape or color
selection
After this commit the theme tours have an additional step during the
shape or color selection
task-2390579
https://github.com/odoo/odoo/pull/62176
https://github.com/odoo/design-themes/pull/428
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/tours/tour_utils.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/website/static/src/js/tours/tour_utils.js b/addons/website/static/src/js/tours/tour_utils.js index 08f60940fe1..3f817b1f2b0 100644 --- a/addons/website/static/src/js/tours/tour_utils.js +++ b/addons/website/static/src/js/tours/tour_utils.js @@ -64,6 +64,17 @@ function changeBackgroundColor(position = "bottom") { }; } +function selectColorPalette(position = "left") { + return { + trigger: ".o_we_customize_panel .o_we_so_color_palette we-selection-items", + alt_trigger: ".o_we_customize_panel .o_we_color_preview", + content: _t(`<b>Select</b> a Color Palette.`), + position: position, + run: 'click', + location: position === 'left' ? '#oe_snippets' : undefined, + }; +} + function changeColumnSize(position = "right") { return { trigger: `.oe_overlay.ui-draggable.o_we_overlay_sticky.oe_active .o_handle.e`, @@ -103,6 +114,18 @@ function changeOption(optionName, weName = '', optionTooltipLabel = '', position }; } +function selectNested(trigger, optionName, alt_trigger = null, optionTooltipLabel = '', position = "top") { + const option_block = `we-customizeblock-option[class='snippet-option-${optionName}']`; + return { + trigger: trigger, + content: _t(`<b>Select</b> a ${optionTooltipLabel}.`), + alt_trigger: alt_trigger == null ? undefined : `${option_block} ${alt_trigger}`, + position: position, + run: 'click', + location: position === 'left' ? '#oe_snippets' : undefined, + }; +} + function changePaddingSize(direction) { let paddingDirection = "n"; let position = "top"; @@ -257,7 +280,9 @@ return { dragNDrop, goBackToBlocks, goToOptions, + selectColorPalette, selectHeader, + selectNested, selectSnippetColumn, registerThemeHomepageTour, |
