Files
design-themes/theme_vehicle/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

46 lines
1.1 KiB
JavaScript

/** @odoo-module **/
import wTourUtils from "@website/js/tours/tour_utils";
const snippets = [
{
id: 's_cover',
name: 'Cover',
},
{
id: 's_text_image',
name: 'Text - Image',
},
{
id: 's_image_text',
name: 'Image - Text',
},
{
id: 's_picture',
name: 'Picture',
},
{
id: 's_masonry_block',
name: 'Masonry',
},
{
id: 's_call_to_action',
name: 'Call to Action',
},
];
wTourUtils.registerThemeHomepageTour("vehicle_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"vehicle-1"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
wTourUtils.goBackToBlocks(),
wTourUtils.dragNDrop(snippets[1], 'top'),
wTourUtils.dragNDrop(snippets[2], 'top'),
wTourUtils.dragNDrop(snippets[3], 'top'),
wTourUtils.dragNDrop(snippets[4], 'top'),
wTourUtils.dragNDrop(snippets[5], 'top'),
wTourUtils.clickOnSnippet(snippets[5]),
wTourUtils.changeBackgroundColor(),
wTourUtils.selectColorPalette(),
]);