*: website, website_blog, website_crm, website_event, website_forum, website_hr_recruitment, website_mass_mailing, website_sale, website_sale_loyalty, website_slides This commit adds the current website displayed view xmlid outside of the iframe, on its container, so that the tours registered with registerThemeHomepageTour can continue to prepend their triggers with the view xml id. Introduce registerEditionTour: this function will allow tour maker to more easily register a tour that needs to start in the iframe's backend and go in edit mode. See merge commit for more information. task-2687506 Co-authored-by: Benjamin Vray <bvr@odoo.com> Co-authored-by: Younn Olivier <yol@odoo.com>
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import tour from "web_tour.tour";
|
|
|
|
tour.register('edit_translated_page_redirect', {
|
|
test: true,
|
|
url: '/nl/contactus',
|
|
}, [
|
|
{
|
|
content: "Enter backend",
|
|
trigger: 'a.o_frontend_to_backend_edit_btn',
|
|
},
|
|
{
|
|
content: "Enter edit mode",
|
|
extra_trigger: 'iframe main:has([data-for="contactus_form"])',
|
|
trigger: '.o_edit_website_container > a',
|
|
},
|
|
{
|
|
content: 'check editor dashboard',
|
|
trigger: '#oe_snippets.o_loaded',
|
|
run: () => {
|
|
// After checking the presence of the editor dashboard, we visit a
|
|
// translated version of the homepage. The homepage is a special
|
|
// case (there is no trailing slash), so we test it separately.
|
|
location.href = '/nl';
|
|
},
|
|
},
|
|
{
|
|
content: "Enter backend",
|
|
trigger: 'a.o_frontend_to_backend_edit_btn',
|
|
},
|
|
{
|
|
content: "Enter edit mode",
|
|
extra_trigger: 'iframe #wrapwrap',
|
|
trigger: '.o_edit_website_container > a',
|
|
},
|
|
{
|
|
content: 'check editor dashboard',
|
|
trigger: '#oe_snippets.o_loaded',
|
|
run: () => {},
|
|
},
|
|
]);
|