From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../static/src/js/tours/mass_mailing_tour.js | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js (limited to 'addons/mass_mailing/static/src/js/tours') diff --git a/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js new file mode 100644 index 00000000..0004e50e --- /dev/null +++ b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js @@ -0,0 +1,88 @@ +odoo.define('mass_mailing.mass_mailing_tour', function (require) { + "use strict"; + + var core = require('web.core'); + var _t = core._t; + var tour = require('web_tour.tour'); + var now = moment(); + + tour.register('mass_mailing_tour', { + url: '/web', + rainbowManMessage: _t('Congratulations, I love your first mailing. :)'), + sequence: 200, + }, [tour.stepUtils.showAppsMenuItem(), { + trigger: '.o_app[data-menu-xmlid="mass_mailing.mass_mailing_menu_root"]', + content: _t("Let's try the Email Marketing app."), + width: 210, + position: 'bottom', + edition: 'enterprise', + }, { + trigger: '.o_app[data-menu-xmlid="mass_mailing.mass_mailing_menu_root"]', + content: _t("Let's try the Email Marketing app."), + edition: 'community', + }, { + trigger: '.o-kanban-button-new', + content: _t("Start by creating your first Mailing."), + position: 'bottom', + }, { + trigger: 'input[name="subject"]', + content: _t('Pick the email subject.'), + position: 'right', + run: 'text ' + now.format("MMMM") + " Newsletter", + }, { + trigger: 'div[name="contact_list_ids"] > .o_input_dropdown > input[type="text"]', + run: 'click', + auto: true, + }, { + trigger: 'li.ui-menu-item', + run: 'click', + auto: true, + }, { + trigger: 'div[name="body_arch"] iframe #newsletter', + content: _t('Choose this theme.'), + position: 'left', + edition: 'enterprise', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe #default', + content: _t('Choose this theme.'), + position: 'right', + edition: 'community', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe div.o_mail_block_paragraph', + content: _t('Click on this paragraph to edit it.'), + position: 'top', + edition: 'enterprise', + run: 'click', + }, { + trigger: 'div[name="body_arch"] iframe div.o_mail_block_title_text', + content: _t('Click on this paragraph to edit it.'), + position: 'top', + edition: 'community', + run: 'click', + }, { + trigger: 'button[name="action_test"]', + content: _t("Test this mailing by sending a copy to yourself."), + position: 'bottom', + }, { + trigger: 'button[name="send_mail_test"]', + content: _t("Check the email address and click send."), + position: 'bottom', + }, { + trigger: 'button[name="action_put_in_queue"]', + content: _t("Ready for take-off!"), + position: 'bottom', + }, { + trigger: '.btn-primary:contains("Ok")', + content: _t("Don't worry, the mailing contact we created is an internal user."), + position: 'bottom', + run: "click", + }, { + trigger: '.o_back_button', + content: _t("By using the Breadcrumb, you can navigate back to the overview."), + position: 'bottom', + run: 'click', + }] + ); +}); -- cgit v1.2.3