Files
design-themes/theme_avantgarde/static/src/js/tour.js
T
Pierre Pulinckx (pipu) 94b3042634 [REF] website_*: Change registerTours of tour_utils
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/design-themes#678

Related: odoo/odoo#130248
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:26 +02:00

40 lines
1.0 KiB
JavaScript

/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
const snippets = [
{
id: 's_cover',
name: 'Cover',
},
{
id: 's_picture',
name: 'Picture',
},
{
id: 's_three_columns',
name: 'Columns',
},
{
id: 's_text_image',
name: 'Text - Image',
},
{
id: 's_call_to_action',
name: 'Call to Action',
},
];
wTourUtils.registerThemeHomepageTour("avantgarde_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"avantgarde-3"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'left'),
wTourUtils.goBackToBlocks(),
wTourUtils.dragNDrop(snippets[1], 'left'),
wTourUtils.dragNDrop(snippets[2], 'bottom'),
wTourUtils.clickOnSnippet(snippets[2], 'top'),
wTourUtils.changePaddingSize('top'),
wTourUtils.goBackToBlocks(),
wTourUtils.dragNDrop(snippets[3], 'top'),
wTourUtils.dragNDrop(snippets[4], 'top'),
]);