[IMP] website(_*): adaptation of tours to new system
+ Adapt website welcome message (Note: temporary duplicate tour: use old version for tests and new version for onboarding)
This commit is contained in:
@@ -1,117 +1,173 @@
|
||||
odoo.define('website.tour.banner', function (require) {
|
||||
'use strict';
|
||||
odoo.define("website.tour.banner", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var Tour = require('web.Tour');
|
||||
var base = require('web_editor.base');
|
||||
var core = require("web.core");
|
||||
var Tour = require('web.Tour');
|
||||
var tour = require("web_tour.tour");
|
||||
var base = require("web_editor.base");
|
||||
|
||||
var _t = core._t;
|
||||
var _t = core._t;
|
||||
|
||||
base.ready().done(function () {
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'banner',
|
||||
mode: 'test',
|
||||
name: _t("Build a page"),
|
||||
path: '/page/homepage',
|
||||
steps: [
|
||||
{
|
||||
waitNot: 'body.editor_enable',
|
||||
title: _t("Welcome to your website!"),
|
||||
content: _t("This tutorial will guide you to build your home page. We will start by adding a banner."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: 'a[data-action=edit]',
|
||||
placement: 'bottom',
|
||||
title: _t("Edit this page"),
|
||||
content: _t("Every page of your website can be modified through the <i>Edit</i> button."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
snippet: '#snippet_structure .oe_snippet:eq(1)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a Banner"),
|
||||
content: _t("Drag the Banner block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.oe_overlay_options .oe_options:visible',
|
||||
element: '#wrapwrap .s_text_block_image_fw h2',
|
||||
placement: 'top',
|
||||
title: _t("Customize banner's text"),
|
||||
content: _t("Click in the title text and start editing it."),
|
||||
sampleText: 'Here, a customized text',
|
||||
},
|
||||
{
|
||||
waitFor: '#wrapwrap .s_text_block_image_fw h2:not(:containsExact(\"Headline\"))',
|
||||
element: '.oe_snippet_parent:visible',
|
||||
placement: 'bottom',
|
||||
title: _t("Get banner properties"),
|
||||
content: _t("Select the parent container to get the global options of the banner."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.oe_overlay_options .oe_options:visible',
|
||||
placement: 'bottom',
|
||||
title: _t("Customize the banner"),
|
||||
content: _t("Customize any block through this menu. Try to change the background of the banner."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
snippet: '#snippet_structure .oe_snippet:eq(6)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop This Block"),
|
||||
content: _t("Drag the <em>'Features'</em> block and drop it below the banner."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.oe_overlay_options .oe_options:visible',
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Publish your page by clicking on the <em>'Save'</em> button."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: 'body.editor_enable',
|
||||
title: _t("Good Job!"),
|
||||
content: _t("Well done, you created your homepage."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: 'a[data-action=show-mobile-preview]',
|
||||
placement: 'bottom',
|
||||
title: _t("Test Your Mobile Version"),
|
||||
content: _t("Let's check how your homepage looks like on mobile devices."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog:has(#mobile-viewport) button[data-dismiss=modal]',
|
||||
placement: 'right',
|
||||
title: _t("Check Mobile Preview"),
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog:has(#mobile-viewport)',
|
||||
element: '#content-menu-button',
|
||||
placement: 'right',
|
||||
title: _t("Pages and menus"),
|
||||
content: _t("The 'Content' menu allows you to rename and delete pages or add them to the top menu."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add new pages"),
|
||||
content: _t("Use this button to add pages"),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
Tour.register({
|
||||
id: 'banner',
|
||||
name: _t("Build a page"),
|
||||
path: '/page/homepage',
|
||||
steps: [
|
||||
{
|
||||
waitNot: 'body.editor_enable',
|
||||
title: _t("Welcome to your website!"),
|
||||
content: _t("This tutorial will guide you to build your home page. We will start by adding a banner."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: 'a[data-action=edit]',
|
||||
placement: 'bottom',
|
||||
title: _t("Edit this page"),
|
||||
content: _t("Every page of your website can be modified through the <i>Edit</i> button."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
snippet: '#snippet_structure .oe_snippet:eq(1)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a Banner"),
|
||||
content: _t("Drag the Banner block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.oe_overlay_options .oe_options:visible',
|
||||
element: '#wrapwrap .s_text_block_image_fw h2',
|
||||
placement: 'top',
|
||||
title: _t("Customize banner's text"),
|
||||
content: _t("Click in the title text and start editing it."),
|
||||
sampleText: 'Here, a customized text',
|
||||
},
|
||||
{
|
||||
waitFor: '#wrapwrap .s_text_block_image_fw h2:not(:containsExact(\"Headline\"))',
|
||||
element: '.oe_snippet_parent:visible',
|
||||
placement: 'bottom',
|
||||
title: _t("Get banner properties"),
|
||||
content: _t("Select the parent container to get the global options of the banner."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.oe_overlay_options .oe_options:visible',
|
||||
placement: 'bottom',
|
||||
title: _t("Customize the banner"),
|
||||
content: _t("Customize any block through this menu. Try to change the background of the banner."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
snippet: '#snippet_structure .oe_snippet:eq(6)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop This Block"),
|
||||
content: _t("Drag the <em>'Features'</em> block and drop it below the banner."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.oe_overlay_options .oe_options:visible',
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Publish your page by clicking on the <em>'Save'</em> button."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: 'body.editor_enable',
|
||||
title: _t("Good Job!"),
|
||||
content: _t("Well done, you created your homepage."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: 'a[data-action=show-mobile-preview]',
|
||||
placement: 'bottom',
|
||||
title: _t("Test Your Mobile Version"),
|
||||
content: _t("Let's check how your homepage looks like on mobile devices."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog:has(#mobile-viewport) button[data-dismiss=modal]',
|
||||
placement: 'right',
|
||||
title: _t("Check Mobile Preview"),
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog:has(#mobile-viewport)',
|
||||
element: '#content-menu-button',
|
||||
placement: 'right',
|
||||
title: _t("Pages and menus"),
|
||||
content: _t("The 'Content' menu allows you to rename and delete pages or add them to the top menu."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
waitNot: '.popover.tour',
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add new pages"),
|
||||
content: _t("Use this button to add pages"),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
tour.register("banner", {
|
||||
skip_enabled: true,
|
||||
url: "/page/homepage?debug=assets",
|
||||
}, [{
|
||||
trigger: "a[data-action=edit]",
|
||||
content: _t("Every page of your website can be modified through the <b>Edit</b> button."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "#snippet_structure .oe_snippet:eq(1) .oe_snippet_thumbnail",
|
||||
content: _t("Drag the Cover block and drop it in your page."),
|
||||
position: "bottom",
|
||||
run: "drag_and_drop",
|
||||
}, {
|
||||
trigger: "#wrapwrap .s_text_block_image_fw h2",
|
||||
extra_trigger: ".oe_overlay_options .oe_options",
|
||||
content: _t("Click in the title text and start editing it."),
|
||||
position: "left",
|
||||
run: "text",
|
||||
}, {
|
||||
trigger: ".oe_snippet_parent",
|
||||
extra_trigger: "#wrapwrap .s_text_block_image_fw h2:not(:containsExact(\"Headline\"))",
|
||||
content: _t("Select the parent container to get the global options of the banner."),
|
||||
position: "left",
|
||||
}, {
|
||||
trigger: ".oe_overlay_options .oe_options",
|
||||
content: _t("Customize any block through this menu. Try to change the background of the banner."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "#snippet_structure .oe_snippet:eq(6) .oe_snippet_thumbnail",
|
||||
content: _t("Drag the \"Features\" block and drop it below the banner."),
|
||||
position: "bottom",
|
||||
run: "drag_and_drop",
|
||||
}, {
|
||||
trigger: "button[data-action=save]",
|
||||
extra_trigger: ".oe_overlay_options .oe_options",
|
||||
content: _t("Publish your page by clicking on the <b>Save</b> button."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=show-mobile-preview]",
|
||||
content: _t("Well done, you created your homepage.<br/>Let's check how your homepage looks like on mobile devices."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: ".modal-dialog:has(#mobile-viewport) button[data-dismiss=modal]",
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "#content-menu-button",
|
||||
extra_trigger: "body:not(.modal-open)",
|
||||
content: _t("The <b>Content</b> menu allows you to rename and delete pages or add them to the top menu."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "#oe_main_menu_navbar a[data-action=new_page]",
|
||||
content: _t("Use this button to add pages"),
|
||||
position: "bottom",
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
|
||||
.o_homepage_editor_welcome_message {
|
||||
font-family: Roboto, @font-family-sans-serif;
|
||||
|
||||
.o_tooltip_container {
|
||||
.o-inline-flex-display();
|
||||
.o-align-items(center);
|
||||
|
||||
> .o_tooltip {
|
||||
.o-position-absolute();
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_editable {
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<div t-name="website.homepage_editor_welcome_message" class="container text-center mt128 mb128 o_homepage_editor_welcome_message">
|
||||
<h2 class="mt0">Welcome to your <b>Homepage</b>!</h2>
|
||||
<p class="lead">Let's start designing.</p>
|
||||
<p>Click on the <b>Edit</b> button in the top-right corner.</p>
|
||||
<div class="o_tooltip_container">Follow the <div class="o_tooltip bottom" style="opacity: 1; z-index: auto;"/> signs to start.</div>
|
||||
</div>
|
||||
</templates>
|
||||
|
||||
@@ -1,131 +1,196 @@
|
||||
odoo.define('website_blog.tour', function (require) {
|
||||
'use strict';
|
||||
odoo.define("website_blog.tour", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var Tour = require('web.Tour');
|
||||
var base = require('web_editor.base');
|
||||
var core = require("web.core");
|
||||
var Tour = require("web.Tour");
|
||||
var tour = require("web_tour.tour");
|
||||
var base = require("web_editor.base");
|
||||
|
||||
var _t = core._t;
|
||||
var _t = core._t;
|
||||
|
||||
base.ready().done(function () {
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'blog',
|
||||
mode: 'test',
|
||||
name: _t("Create a blog post"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("New Blog Post"),
|
||||
content: _t("Let's go through the first steps to write beautiful blog posts."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add Content"),
|
||||
content: _t("Use this button to create a new blog post like any other document (page, menu, products, event, ...)."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_blog_post]',
|
||||
placement: 'left',
|
||||
title: _t("New Blog Post"),
|
||||
content: _t("Select this menu item to create a new blog post."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("Blog Post Created"),
|
||||
content: _t("This is your new blog post. Let's edit it."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
element: 'h1[data-oe-expression="blog_post.name"]',
|
||||
placement: 'top',
|
||||
title: _t("Post Headline"),
|
||||
sampleText:'Blog Post Title',
|
||||
content: _t("Write a title, the subtitle is optional."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#wrap h1[data-oe-expression="blog_post.name"]:'+'containsExact("")',
|
||||
element: '#oe_manipulators .oe_overlay.oe_active a.btn.btn-primary.btn-sm',
|
||||
placement: 'right',
|
||||
title: _t("Customize Cover"),
|
||||
content: _t("Change and customize your blog post cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a:'+ 'containsExact(' + _t("Change Cover")+ '):eq(1)',
|
||||
placement: 'right',
|
||||
title: _t("Cover"),
|
||||
content: _t("Select this menu item to change blog cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.modal:has(.o_existing_attachment_cell:nth(1))',
|
||||
element: '.modal .o_existing_attachment_cell:nth(1) img',
|
||||
placement: 'top',
|
||||
title: _t("Choose an image"),
|
||||
content: _t("Choose an image from the library."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.o_existing_attachment_cell.o_selected',
|
||||
element: '.modal-content button.o_save_button',
|
||||
placement: 'top',
|
||||
title: _t("Save"),
|
||||
content: _t("Click on '<em>Save</em>' to set the picture as cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-content:visible',
|
||||
element: '.blog_content section.mt16',
|
||||
placement: 'top',
|
||||
title: _t("Content"),
|
||||
content: _t("Start writing your story here."),
|
||||
sampleText: ' ',
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#blog_content section:first p:first:containsExact(' + _t('Start writing here...') + ')',
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications once you are done"),
|
||||
content: _t("Click on '<em>Save</em>' button to record changes on the page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: 'button[data-action=save]:visible',
|
||||
element: 'a[data-action=show-mobile-preview]',
|
||||
placement: 'bottom',
|
||||
title: _t("Mobile Preview"),
|
||||
content: _t("Click on the mobile icon to preview how your blog post will be displayed on a mobile device."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.modal:has(#mobile-viewport):visible',
|
||||
element: '.modal:has(#mobile-viewport) button[data-dismiss=modal]',
|
||||
placement: 'right',
|
||||
title: _t("Check Mobile Preview"),
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '.modal:has(#mobile-viewport) button[data-dismiss=modal]:visible',
|
||||
element: 'button.btn-danger.js_publish_btn',
|
||||
placement: 'top',
|
||||
title: _t("Publishing status"),
|
||||
content: _t(" Click on this button to send your blog post online."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
title: "Thanks!",
|
||||
content: _t("This tutorial is over. To discover more features and improve the content of this page, go to the upper left customize menu. You can also add some cool content with your text in the edit mode with the upper right button."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
Tour.register({
|
||||
id: 'blog',
|
||||
name: _t("Create a blog post"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("New Blog Post"),
|
||||
content: _t("Let's go through the first steps to write beautiful blog posts."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add Content"),
|
||||
content: _t("Use this button to create a new blog post like any other document (page, menu, products, event, ...)."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_blog_post]',
|
||||
placement: 'left',
|
||||
title: _t("New Blog Post"),
|
||||
content: _t("Select this menu item to create a new blog post."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("Blog Post Created"),
|
||||
content: _t("This is your new blog post. Let's edit it."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
element: 'h1[data-oe-expression="blog_post.name"]',
|
||||
placement: 'top',
|
||||
title: _t("Post Headline"),
|
||||
sampleText:'Blog Post Title',
|
||||
content: _t("Write a title, the subtitle is optional."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#wrap h1[data-oe-expression="blog_post.name"]:'+'containsExact("")',
|
||||
element: '#oe_manipulators .oe_overlay.oe_active a.btn.btn-primary.btn-sm',
|
||||
placement: 'right',
|
||||
title: _t("Customize Cover"),
|
||||
content: _t("Change and customize your blog post cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a:'+ 'containsExact(' + _t("Change Cover")+ '):eq(1)',
|
||||
placement: 'right',
|
||||
title: _t("Cover"),
|
||||
content: _t("Select this menu item to change blog cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.modal:has(.o_existing_attachment_cell:nth(1))',
|
||||
element: '.modal .o_existing_attachment_cell:nth(1) img',
|
||||
placement: 'top',
|
||||
title: _t("Choose an image"),
|
||||
content: _t("Choose an image from the library."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.o_existing_attachment_cell.o_selected',
|
||||
element: '.modal-content button.o_save_button',
|
||||
placement: 'top',
|
||||
title: _t("Save"),
|
||||
content: _t("Click on '<em>Save</em>' to set the picture as cover."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-content:visible',
|
||||
element: '.blog_content section.mt16',
|
||||
placement: 'top',
|
||||
title: _t("Content"),
|
||||
content: _t("Start writing your story here."),
|
||||
sampleText: ' ',
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#blog_content section:first p:first:containsExact(' + _t('Start writing here...') + ')',
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications once you are done"),
|
||||
content: _t("Click on '<em>Save</em>' button to record changes on the page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: 'button[data-action=save]:visible',
|
||||
element: 'a[data-action=show-mobile-preview]',
|
||||
placement: 'bottom',
|
||||
title: _t("Mobile Preview"),
|
||||
content: _t("Click on the mobile icon to preview how your blog post will be displayed on a mobile device."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.modal:has(#mobile-viewport):visible',
|
||||
element: '.modal:has(#mobile-viewport) button[data-dismiss=modal]',
|
||||
placement: 'right',
|
||||
title: _t("Check Mobile Preview"),
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '.modal:has(#mobile-viewport) button[data-dismiss=modal]:visible',
|
||||
element: 'button.btn-danger.js_publish_btn',
|
||||
placement: 'top',
|
||||
title: _t("Publishing status"),
|
||||
content: _t(" Click on this button to send your blog post online."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
title: "Thanks!",
|
||||
content: _t("This tutorial is over. To discover more features and improve the content of this page, go to the upper left customize menu. You can also add some cool content with your text in the edit mode with the upper right button."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
tour.register("blog", {
|
||||
skip_enabled: true,
|
||||
url: "/blog",
|
||||
}, [{
|
||||
trigger: "#oe_main_menu_navbar a[data-action=new_page]",
|
||||
content: _t("Use this button to create a new blog post like any other document (page, menu, products, event, ...)."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=new_blog_post]",
|
||||
content: _t("Select this menu item to create a new blog post."),
|
||||
position: "left",
|
||||
}, {
|
||||
trigger: "h1[data-oe-expression=\"blog_post.name\"]",
|
||||
content: _t("Write a title, the subtitle is optional."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: "#oe_manipulators .oe_overlay.oe_active a.btn.btn-primary.btn-sm",
|
||||
extra_trigger: "#wrap h1[data-oe-expression=\"blog_post.name\"]:not(:containsExact(\"\"))",
|
||||
content: _t("Change and customize your blog post cover."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "a:containsExact(" + _t("Change Cover")+ "):eq(1)",
|
||||
content: _t("Select this menu item to change blog cover."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: ".o_select_media_dialog .o_existing_attachment_cell:nth(1) img",
|
||||
extra_trigger: ".modal:has(.o_existing_attachment_cell:nth(1))",
|
||||
content: _t("Choose an image from the library."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: ".o_select_media_dialog .btn.o_save_button",
|
||||
extra_trigger: ".o_existing_attachment_cell.o_selected",
|
||||
content: _t("Click on <b>Save</b> to set the picture as cover."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: ".blog_content section.mt16",
|
||||
content: _t("Start writing your story here."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: "button[data-action=save]",
|
||||
extra_trigger: "#blog_content section:first p:first:not(:containsExact(" + _t("Start writing here...") + "))",
|
||||
content: _t("Click on <b>Save</b> button to record changes on the page."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=show-mobile-preview]",
|
||||
extra_trigger: "body:not(.editor_enable)",
|
||||
content: _t("Click on the mobile icon to preview how your blog post will be displayed on a mobile device."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "button[data-dismiss=modal]",
|
||||
extra_trigger: ".modal:has(#mobile-viewport)",
|
||||
content: _t("Scroll to check rendering and then close the mobile preview."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "button.btn-danger.js_publish_btn",
|
||||
position: "top",
|
||||
content: _t(" Click on this button to send your blog post online."),
|
||||
}, {
|
||||
trigger: "#wrap h1",
|
||||
extra_trigger: ".js_publish_management button.js_publish_btn.btn-success:visible",
|
||||
content: _t("This tutorial is over. To discover more features and improve the content of this page, go to the upper left customize menu. You can also add some cool content with your text in the edit mode with the upper right button."),
|
||||
position: "top",
|
||||
width: 500,
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,91 +1,130 @@
|
||||
odoo.define('website_event.tour', function (require) {
|
||||
'use strict';
|
||||
odoo.define("website_event.tour", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var Tour = require('web.Tour');
|
||||
var base = require('web_editor.base');
|
||||
var website = require('website.website');
|
||||
var core = require("web.core");
|
||||
var Tour = require("web.Tour");
|
||||
var tour = require("web_tour.tour");
|
||||
var base = require("web_editor.base");
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var _t = core._t;
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'event',
|
||||
mode: 'test',
|
||||
name: _t("Create an event"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Create an Event"),
|
||||
content: _t("Let's go through the first steps to publish a new event."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add Content"),
|
||||
content: _t("This button allows you to create new pages, events, menus, etc."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_event]',
|
||||
placement: 'left',
|
||||
title: _t("New Event"),
|
||||
content: _t("Click here to create a new event."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog #editor_new_event input[type=text]',
|
||||
sampleText: 'Advanced Technical Training',
|
||||
placement: 'right',
|
||||
title: _t("Create an Event Name"),
|
||||
content: _t("Create a name for your new event and click <em>'Continue'</em>. e.g: Technical Training"),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog #editor_new_event input[type=text]:not([value!=""])',
|
||||
element: '.modal-dialog button.btn-primary.btn-continue',
|
||||
placement: 'right',
|
||||
title: _t("Create Event"),
|
||||
content: _t("Click <em>Continue</em> to create the event."),
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("New Event Created"),
|
||||
content: _t("This is your new event page. We will edit the event presentation page."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
snippet: '#snippet_structure .oe_snippet:eq(2)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a block"),
|
||||
content: _t("Drag the 'Image-Text' block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Once you click on save, your event is updated."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#web_editor-top-edit',
|
||||
element: 'button.btn-danger.js_publish_btn',
|
||||
placement: 'top',
|
||||
title: _t("Publish your event"),
|
||||
content: _t("Click to publish your event."),
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
element: '.js_publish_management button[data-toggle="dropdown"]',
|
||||
placement: 'left',
|
||||
title: _t("Customize your event"),
|
||||
content: _t("Click here to customize your event further."),
|
||||
},
|
||||
{
|
||||
element: '.js_publish_management ul>li>a:last:visible',
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'event',
|
||||
name: _t("Create an event"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Create an Event"),
|
||||
content: _t("Let's go through the first steps to publish a new event."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Add Content"),
|
||||
content: _t("This button allows you to create new pages, events, menus, etc."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_event]',
|
||||
placement: 'left',
|
||||
title: _t("New Event"),
|
||||
content: _t("Click here to create a new event."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog #editor_new_event input[type=text]',
|
||||
sampleText: 'Advanced Technical Training',
|
||||
placement: 'right',
|
||||
title: _t("Create an Event Name"),
|
||||
content: _t("Create a name for your new event and click <em>'Continue'</em>. e.g: Technical Training"),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog #editor_new_event input[type=text]:not([value!=""])',
|
||||
element: '.modal-dialog button.btn-primary.btn-continue',
|
||||
placement: 'right',
|
||||
title: _t("Create Event"),
|
||||
content: _t("Click <em>Continue</em> to create the event."),
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("New Event Created"),
|
||||
content: _t("This is your new event page. We will edit the event presentation page."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
snippet: '#snippet_structure .oe_snippet:eq(2)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a block"),
|
||||
content: _t("Drag the 'Image-Text' block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Once you click on save, your event is updated."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#web_editor-top-edit',
|
||||
element: 'button.btn-danger.js_publish_btn',
|
||||
placement: 'top',
|
||||
title: _t("Publish your event"),
|
||||
content: _t("Click to publish your event."),
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
element: '.js_publish_management button[data-toggle="dropdown"]',
|
||||
placement: 'left',
|
||||
title: _t("Customize your event"),
|
||||
content: _t("Click here to customize your event further."),
|
||||
},
|
||||
{
|
||||
element: '.js_publish_management ul>li>a:last:visible',
|
||||
},
|
||||
]
|
||||
tour.register("event", {
|
||||
skip_enabled: true,
|
||||
url: "/event",
|
||||
}, [{
|
||||
trigger: "#oe_main_menu_navbar a[data-action=new_page]",
|
||||
content: _t("This button allows you to create new pages, events, menus, etc."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=new_event]",
|
||||
content: _t("Click here to create a new event."),
|
||||
position: "left",
|
||||
}, {
|
||||
trigger: ".modal-dialog #editor_new_event input[type=text]",
|
||||
content: _t("Create a name for your new event and click <em>\"Continue\"</em>. e.g: Technical Training"),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: ".modal-dialog button.btn-primary.btn-continue",
|
||||
extra_trigger: ".modal-dialog #editor_new_event input[type=text][value!=\"\"]",
|
||||
content: _t("Click <em>Continue</em> to create the event."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "#snippet_structure .oe_snippet:eq(2)",
|
||||
content: _t("Drag this block and drop it in your page."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "button[data-action=save]",
|
||||
content: _t("Once you click on save, your event is updated."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "button.btn-danger.js_publish_btn",
|
||||
extra_trigger: "body:not(.editor_enable)",
|
||||
content: _t("Click to publish your event."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: ".js_publish_management button[data-toggle=\"dropdown\"]",
|
||||
extra_trigger: ".js_publish_management button.js_publish_btn.btn-success:visible",
|
||||
content: _t("Click here to customize your event further."),
|
||||
position: "left",
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,128 +1,190 @@
|
||||
odoo.define('website_forum.tour_forum', function (require) {
|
||||
'use strict';
|
||||
odoo.define("website_forum.tour_forum", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var Tour = require('web.Tour');
|
||||
var core = require("web.core");
|
||||
var Tour = require("web.Tour");
|
||||
var tour = require("web_tour.tour");
|
||||
var base = require("web_editor.base");
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
Tour.register({
|
||||
id: 'question',
|
||||
name: _t("Create a question"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Create a Question!"),
|
||||
content: _t("Let's go through the first steps to create a new question."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
title: _t("Add Content"),
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
content: _t("Use this button to create a new forum like any other document (page, menu, products, event, ...)."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
title: _t("New Forum"),
|
||||
element: 'a[data-action=new_forum]',
|
||||
placement: 'left',
|
||||
content: _t("Select this menu item to create a new forum."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
title: _t("Forum Name"),
|
||||
element: '.modal #editor_new_forum input[type=text]',
|
||||
sampleText:'New Forum',
|
||||
placement: 'right',
|
||||
content: _t("Enter a name for your new forum."),
|
||||
},
|
||||
{
|
||||
title: _t("Create Forum"),
|
||||
waitNot: ".modal #editor_new_forum input[type=text]:propValue('')",
|
||||
element: '.modal button.btn-primary',
|
||||
placement: 'right',
|
||||
content: _t("Click <em>Continue</em> to create the forum."),
|
||||
},
|
||||
{
|
||||
title: _t("New Forum Created"),
|
||||
waitNot: '.modal:visible',
|
||||
content: _t("This page contains all the information related to the new forum."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Ask a Question"),
|
||||
element: '.btn-block a:first',
|
||||
placement: 'left',
|
||||
content: _t("Ask the question in this forum by clicking on the button."),
|
||||
},
|
||||
{
|
||||
title: _t("Question Title"),
|
||||
element: 'input[name=post_name]',
|
||||
sampleText:'First Question Title',
|
||||
placement: 'top',
|
||||
content: _t("Give your question title."),
|
||||
},
|
||||
{
|
||||
title: _t("Question"),
|
||||
waitNot: "input[name=post_name]:propValue('')",
|
||||
element: '.note-editable p',
|
||||
sampleText: 'First Question',
|
||||
placement: 'top',
|
||||
content: _t("Put your question here."),
|
||||
},
|
||||
{
|
||||
title: _t("Give Tag"),
|
||||
waitNot: '.note-editable p:containsExact("<br>")',
|
||||
element: '.select2-choices',
|
||||
placement: 'top',
|
||||
content: _t("Insert tags related to your question."),
|
||||
},
|
||||
{
|
||||
title: _t("Post Question"),
|
||||
waitNot: "input[id=s2id_autogen2]:propValue('Tags')",
|
||||
element: 'button:contains("Post Your Question")',
|
||||
placement: 'bottom',
|
||||
content: _t("Click to post your question."),
|
||||
},
|
||||
{
|
||||
title: _t("New Question Created"),
|
||||
waitFor: '.fa-star',
|
||||
content: _t("This page contains the newly created questions."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Answer"),
|
||||
element: '.note-editable p',
|
||||
sampleText: 'First Answer',
|
||||
placement: 'top',
|
||||
content: _t("Put your answer here."),
|
||||
},
|
||||
{
|
||||
title: _t("Post Answer"),
|
||||
waitNot: '.note-editable p:containsExact("<br>")',
|
||||
element: 'button:contains("Post Answer")',
|
||||
placement: 'bottom',
|
||||
content: _t("Click to post your answer."),
|
||||
},
|
||||
{
|
||||
title: _t("Answer Posted"),
|
||||
waitFor: '.fa-check-circle',
|
||||
content: _t("This page contains the newly created questions and its answers."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Accept Answer"),
|
||||
element: 'a[data-karma="20"]:first',
|
||||
placement: 'right',
|
||||
content: _t("Click here to accept this answer."),
|
||||
},
|
||||
{
|
||||
title: _t("Congratulations"),
|
||||
waitFor: '.oe_answer_true',
|
||||
content: _t("Congratulations! You just created and post your first question and answer."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
});
|
||||
var _t = core._t;
|
||||
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'question',
|
||||
mode: 'test',
|
||||
name: _t("Create a question"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Create a Question!"),
|
||||
content: _t("Let's go through the first steps to create a new question."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
title: _t("Add Content"),
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
content: _t("Use this button to create a new forum like any other document (page, menu, products, event, ...)."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
title: _t("New Forum"),
|
||||
element: 'a[data-action=new_forum]',
|
||||
placement: 'left',
|
||||
content: _t("Select this menu item to create a new forum."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
title: _t("Forum Name"),
|
||||
element: '.modal #editor_new_forum input[type=text]',
|
||||
sampleText:'New Forum',
|
||||
placement: 'right',
|
||||
content: _t("Enter a name for your new forum."),
|
||||
},
|
||||
{
|
||||
title: _t("Create Forum"),
|
||||
waitNot: ".modal #editor_new_forum input[type=text]:propValue('')",
|
||||
element: '.modal button.btn-primary',
|
||||
placement: 'right',
|
||||
content: _t("Click <em>Continue</em> to create the forum."),
|
||||
},
|
||||
{
|
||||
title: _t("New Forum Created"),
|
||||
waitNot: '.modal:visible',
|
||||
content: _t("This page contains all the information related to the new forum."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Ask a Question"),
|
||||
element: '.btn-block a:first',
|
||||
placement: 'left',
|
||||
content: _t("Ask the question in this forum by clicking on the button."),
|
||||
},
|
||||
{
|
||||
title: _t("Question Title"),
|
||||
element: 'input[name=post_name]',
|
||||
sampleText:'First Question Title',
|
||||
placement: 'top',
|
||||
content: _t("Give your question title."),
|
||||
},
|
||||
{
|
||||
title: _t("Question"),
|
||||
waitNot: "input[name=post_name]:propValue('')",
|
||||
element: '.note-editable p',
|
||||
sampleText: 'First Question',
|
||||
placement: 'top',
|
||||
content: _t("Put your question here."),
|
||||
},
|
||||
{
|
||||
title: _t("Give Tag"),
|
||||
waitNot: '.note-editable p:containsExact("<br>")',
|
||||
element: '.select2-choices',
|
||||
placement: 'top',
|
||||
content: _t("Insert tags related to your question."),
|
||||
},
|
||||
{
|
||||
title: _t("Post Question"),
|
||||
waitNot: "input[id=s2id_autogen2]:propValue('Tags')",
|
||||
element: 'button:contains("Post Your Question")',
|
||||
placement: 'bottom',
|
||||
content: _t("Click to post your question."),
|
||||
},
|
||||
{
|
||||
title: _t("New Question Created"),
|
||||
waitFor: '.fa-star',
|
||||
content: _t("This page contains the newly created questions."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Answer"),
|
||||
element: '.note-editable p',
|
||||
sampleText: 'First Answer',
|
||||
placement: 'top',
|
||||
content: _t("Put your answer here."),
|
||||
},
|
||||
{
|
||||
title: _t("Post Answer"),
|
||||
waitNot: '.note-editable p:containsExact("<br>")',
|
||||
element: 'button:contains("Post Answer")',
|
||||
placement: 'bottom',
|
||||
content: _t("Click to post your answer."),
|
||||
},
|
||||
{
|
||||
title: _t("Answer Posted"),
|
||||
waitFor: '.fa-check-circle',
|
||||
content: _t("This page contains the newly created questions and its answers."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
title: _t("Accept Answer"),
|
||||
element: 'a[data-karma="20"]:first',
|
||||
placement: 'right',
|
||||
content: _t("Click here to accept this answer."),
|
||||
},
|
||||
{
|
||||
title: _t("Congratulations"),
|
||||
waitFor: '.oe_answer_true',
|
||||
content: _t("Congratulations! You just created and post your first question and answer."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
tour.register("question", {
|
||||
skip_enabled: true,
|
||||
url: "/forum",
|
||||
}, [{
|
||||
trigger: "#oe_main_menu_navbar a[data-action=new_page]",
|
||||
content: _t("Use this button to create a new forum like any other document (page, menu, products, event, ...)."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=new_forum]",
|
||||
content: _t("Select this menu item to create a new forum."),
|
||||
position: "left",
|
||||
}, {
|
||||
trigger: "#editor_new_forum input[type=text]",
|
||||
content: _t("Enter a name for your new forum."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "button.btn-primary",
|
||||
extra_trigger: ".modal #editor_new_forum input[type=text]:not(:propValue(\"\"))",
|
||||
content: _t("Click <em>Continue</em> to create the forum."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: ".btn-block a:first",
|
||||
position: "left",
|
||||
content: _t("Ask the question in this forum by clicking on the button."),
|
||||
}, {
|
||||
trigger: "input[name=post_name]",
|
||||
position: "top",
|
||||
content: _t("Give your question title."),
|
||||
}, {
|
||||
trigger: ".note-editable p",
|
||||
extra_trigger: "input[name=post_name]:not(:propValue(\"\"))",
|
||||
content: _t("Put your question here."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: ".select2-choices",
|
||||
extra_trigger: ".note-editable p:not(:containsExact(\"<br>\"))",
|
||||
content: _t("Insert tags related to your question."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: "button:contains(\"Post Your Question\")",
|
||||
extra_trigger: "input[id=s2id_autogen2]:not(:propValue(\"Tags\"))",
|
||||
content: _t("Click to post your question."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: ".note-editable p",
|
||||
content: _t("Put your answer here."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "button:contains(\"Post Answer\")",
|
||||
extra_trigger: ".note-editable p:not(:containsExact(\"<br>\"))",
|
||||
content: _t("Click to post your answer."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-karma=\"20\"]:first",
|
||||
content: _t("Click here to accept this answer."),
|
||||
position: "right",
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,118 +1,172 @@
|
||||
odoo.define('website_sale.tour_shop', function (require) {
|
||||
'use strict';
|
||||
odoo.define("website_sale.tour_shop", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var Tour = require('web.Tour');
|
||||
var base = require('web_editor.base');
|
||||
var website = require('website.website');
|
||||
var core = require("web.core");
|
||||
var Tour = require("web.Tour");
|
||||
var tour = require("web_tour.tour");
|
||||
var base = require("web_editor.base");
|
||||
|
||||
var _t = core._t;
|
||||
var _t = core._t;
|
||||
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'shop',
|
||||
name: _t("Create a product"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Welcome to your shop"),
|
||||
content: _t("You successfully installed the e-commerce. This guide will help you to create your product and promote your sales."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Create your first product"),
|
||||
content: _t("Click here to add a new product."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_product]',
|
||||
placement: 'left',
|
||||
title: _t("Create a new product"),
|
||||
content: _t("Select <em>New Product</em> to create it and manage its properties to boost your sales."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog #editor_new_product input[type=text]',
|
||||
sampleText: 'New Product',
|
||||
placement: 'right',
|
||||
title: _t("Choose name"),
|
||||
content: _t("Enter a name for your new product"),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog #editor_new_product input[type=text]:not([value!=""])',
|
||||
element: '.modal-dialog button.btn-primary.btn-continue',
|
||||
placement: 'right',
|
||||
title: _t("Create Product"),
|
||||
content: _t("Click on <em>Continue</em> to create the product."),
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("New product created"),
|
||||
content: _t("This page contains all the information related to the new product."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
element: '.product_price .oe_currency_value:visible:first',
|
||||
sampleText: '20.50',
|
||||
placement: 'bottom',
|
||||
title: _t("Change the price"),
|
||||
content: _t("Edit the price of this product by clicking on the amount."),
|
||||
},
|
||||
{
|
||||
waitNot: '.product_price .oe_currency_value:visible:first:containsExact(1.00)',
|
||||
element: '#wrap img.product_detail_img',
|
||||
placement: 'top',
|
||||
title: _t("Update image"),
|
||||
content: _t("Click here to set an image describing your product."),
|
||||
},
|
||||
{
|
||||
element: '.modal .o_existing_attachment_cell:nth(2) img',
|
||||
placement: 'top',
|
||||
title: _t("Choose an image"),
|
||||
content: _t("Choose an image from the library."),
|
||||
popover: { fixed: true },
|
||||
onload: function () {
|
||||
$('form[action="/web_editor/attachment/add"] .well > *').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
element: '.modal .btn.o_save_button',
|
||||
placement: 'right',
|
||||
waitFor: '.o_existing_attachment_cell.o_selected',
|
||||
title: _t("Save"),
|
||||
content: _t("Click on <em>Save</em> to add the image to the product description."),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-content:visible',
|
||||
snippet: '#snippet_structure .oe_snippet:eq(8)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a block"),
|
||||
content: _t("Drag this website block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Once you click on <em>Save</em>, your product is updated."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#web_editor-top-edit',
|
||||
element: '.js_publish_management button.js_publish_btn.btn-danger',
|
||||
placement: 'top',
|
||||
title: _t("Publish your product"),
|
||||
content: _t("Click on <em>Publish</em> your product so your customers can see it."),
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
title: _t("Congratulations"),
|
||||
content: _t("Congratulations! You just created and published your first product."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
base.ready().done(function () {
|
||||
Tour.register({
|
||||
id: 'shop',
|
||||
mode: 'test',
|
||||
name: _t("Create a product"),
|
||||
steps: [
|
||||
{
|
||||
title: _t("Welcome to your shop"),
|
||||
content: _t("You successfully installed the e-commerce. This guide will help you to create your product and promote your sales."),
|
||||
popover: { next: _t("Start Tutorial"), end: _t("Skip It") },
|
||||
},
|
||||
{
|
||||
element: '#oe_main_menu_navbar a[data-action=new_page]',
|
||||
placement: 'bottom',
|
||||
title: _t("Create your first product"),
|
||||
content: _t("Click here to add a new product."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'a[data-action=new_product]',
|
||||
placement: 'left',
|
||||
title: _t("Create a new product"),
|
||||
content: _t("Select <em>New Product</em> to create it and manage its properties to boost your sales."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: '.modal-dialog #editor_new_product input[type=text]',
|
||||
sampleText: 'New Product',
|
||||
placement: 'right',
|
||||
title: _t("Choose name"),
|
||||
content: _t("Enter a name for your new product"),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-dialog #editor_new_product input[type=text]:not([value!=""])',
|
||||
element: '.modal-dialog button.btn-primary.btn-continue',
|
||||
placement: 'right',
|
||||
title: _t("Create Product"),
|
||||
content: _t("Click on <em>Continue</em> to create the product."),
|
||||
},
|
||||
{
|
||||
waitFor: '#o_scroll .oe_snippet',
|
||||
title: _t("New product created"),
|
||||
content: _t("This page contains all the information related to the new product."),
|
||||
popover: { next: _t("Continue") },
|
||||
},
|
||||
{
|
||||
element: '.product_price .oe_currency_value:visible:first',
|
||||
sampleText: '20.50',
|
||||
placement: 'bottom',
|
||||
title: _t("Change the price"),
|
||||
content: _t("Edit the price of this product by clicking on the amount."),
|
||||
},
|
||||
{
|
||||
waitNot: '.product_price .oe_currency_value:visible:first:containsExact(1.00)',
|
||||
element: '#wrap img.product_detail_img',
|
||||
placement: 'top',
|
||||
title: _t("Update image"),
|
||||
content: _t("Click here to set an image describing your product."),
|
||||
},
|
||||
{
|
||||
element: '.modal .o_existing_attachment_cell:nth(2) img',
|
||||
placement: 'top',
|
||||
title: _t("Choose an image"),
|
||||
content: _t("Choose an image from the library."),
|
||||
popover: { fixed: true },
|
||||
onload: function () {
|
||||
$('form[action="/web_editor/attachment/add"] .well > *').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
element: '.modal .btn.o_save_button',
|
||||
placement: 'right',
|
||||
waitFor: '.o_existing_attachment_cell.o_selected',
|
||||
title: _t("Save"),
|
||||
content: _t("Click on <em>Save</em> to add the image to the product description."),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal-content:visible',
|
||||
snippet: '#snippet_structure .oe_snippet:eq(8)',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a block"),
|
||||
content: _t("Drag this website block and drop it in your page."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'bottom',
|
||||
title: _t("Save your modifications"),
|
||||
content: _t("Once you click on <em>Save</em>, your product is updated."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
waitNot: '#web_editor-top-edit',
|
||||
element: '.js_publish_management button.js_publish_btn.btn-danger',
|
||||
placement: 'top',
|
||||
title: _t("Publish your product"),
|
||||
content: _t("Click on <em>Publish</em> your product so your customers can see it."),
|
||||
},
|
||||
{
|
||||
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
|
||||
title: _t("Congratulations"),
|
||||
content: _t("Congratulations! You just created and published your first product."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
tour.register("shop", {
|
||||
skip_enabled: true,
|
||||
url: "/shop",
|
||||
}, [{
|
||||
trigger: "#oe_main_menu_navbar a[data-action=new_page]",
|
||||
content: _t("You successfully installed the e-commerce.<br/>Click here to add a new product."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "a[data-action=new_product]",
|
||||
content: _t("Select <b>New Product</b> to create it and manage its properties to boost your sales."),
|
||||
position: "left",
|
||||
}, {
|
||||
trigger: ".modal-dialog #editor_new_product input[type=text]",
|
||||
content: _t("Enter a name for your new product"),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: ".modal-dialog button.btn-primary.btn-continue",
|
||||
extra_trigger: ".modal-dialog #editor_new_product input[type=text][value!=\"\"]",
|
||||
content: _t("Click on <em>Continue</em> to create the product."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: ".product_price .oe_currency_value:visible:first",
|
||||
content: _t("Edit the price of this product by clicking on the amount."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "#wrap img.product_detail_img",
|
||||
extra_trigger: ".product_price .oe_currency_value:visible:first:not(:containsExact(1.00))",
|
||||
content: _t("Click here to set an image describing your product."),
|
||||
position: "top",
|
||||
}, {
|
||||
trigger: ".o_select_media_dialog img:first",
|
||||
content: _t("Choose an image from the library."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: ".o_select_media_dialog .btn.o_save_button",
|
||||
extra_trigger: ".o_existing_attachment_cell.o_selected",
|
||||
content: _t("Click on <b>Save</b> to add the image to the product description."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: "#snippet_structure .oe_snippet:eq(8)",
|
||||
extra_trigger: "body:not(.modal-open)",
|
||||
content: _t("Drag this website block and drop it in your page."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: "button[data-action=save]",
|
||||
content: _t("Once you click on <b>Save</b>, your product is updated."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: ".js_publish_management button.js_publish_btn.btn-danger",
|
||||
extra_trigger: "body:not(.editor_enable)",
|
||||
content: _t("Click on this button so your customers can see it."),
|
||||
position: "top",
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user