mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import wTourUtils from '@website/js/tours/tour_utils';
|
||||
import { _t } from '@web/legacy/js/services/core';
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
const snippets = [
|
||||
{
|
||||
@@ -30,7 +30,7 @@ const snippets = [
|
||||
},
|
||||
];
|
||||
|
||||
wTourUtils.registerThemeHomepageTour("notes_tour", [
|
||||
wTourUtils.registerThemeHomepageTour("notes_tour", () => [
|
||||
wTourUtils.assertCssVariable('--color-palettes-name', '"notes-1"'),
|
||||
wTourUtils.dragNDrop(snippets[0]),
|
||||
wTourUtils.clickOnText(snippets[0], 'h1'),
|
||||
|
||||
Reference in New Issue
Block a user