diff --git a/addons/website/static/src/js/website.tour.banner.js b/addons/website/static/src/js/website.tour.banner.js
index f0b9043f20f..029753d91a7 100644
--- a/addons/website/static/src/js/website.tour.banner.js
+++ b/addons/website/static/src/js/website.tour.banner.js
@@ -11,145 +11,139 @@
});
website.BannerTour = website.Tour.extend({
- id: 'banner',
+ id: 'banner',
name: "Insert a banner",
- startPath: '/page/website.homepage',
+ path: '/page/website.homepage',
init: function (editor) {
var self = this;
self.steps = [
{
- stepId: 'welcome',
- title: "Welcome to your website!",
- content: "This tutorial will guide you to build your home page. We will start by adding a banner.",
+ stepId: 'welcome',
+ title: "Welcome to your website!",
+ content: "This tutorial will guide you to build your home page. We will start by adding a banner.",
template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
backdrop: true,
},
{
- stepId: 'edit-page',
- element: 'button[data-action=edit]',
+ stepId: 'edit-page',
+ element: 'button[data-action=edit]',
placement: 'bottom',
- title: "Edit this page",
- content: "Every page of your website can be modified through the Edit button.",
+ title: "Edit this page",
+ content: "Every page of your website can be modified through the Edit button.",
trigger: {
+ id: 'rte:ready',
+ type: 'openerp',
emitter: editor,
- type: 'openerp',
- id: 'rte:ready',
},
},
{
- stepId: 'add-banner',
- element: 'button[data-action=snippet]',
+ stepId: 'add-banner',
+ element: 'button[data-action=snippet]',
placement: 'bottom',
- title: "Insert building blocks",
- content: "To add content in a page, you can insert building blocks.",
- trigger: 'click',
+ title: "Insert building blocks",
+ content: "To add content in a page, you can insert building blocks.",
+ trigger: 'click',
},
{
- stepId: 'drag-banner',
- snippet: 'carousel',
+ stepId: 'drag-banner',
+ snippet: 'carousel',
placement: 'bottom',
- title: "Drag & Drop a Banner",
- content: "Drag the Banner block and drop it in your page.",
- trigger: 'drag',
+ title: "Drag & Drop a Banner",
+ content: "Drag the Banner block and drop it in your page.",
+ trigger: 'drag',
},
{
- stepId: 'edit-title',
- element: '#wrap [data-snippet-id=carousel]:first .carousel-caption',
+ stepId: 'edit-title',
+ element: '#wrap [data-snippet-id=carousel]:first .carousel-caption',
placement: 'top',
- title: "Customize banner's text",
- content: "Click in the text and start editing it. Click continue once it's done.",
- template: self.popover({ next: "Continue" }),
- onStart: function () {
- var $banner = $("#wrap [data-snippet-id=carousel]:first");
- if ($banner.length) {
- $banner.click();
- }
- },
+ title: "Customize banner's text",
+ content: "Click in the text and start editing it. Click continue once it's done.",
+ template: self.popover({ next: "Continue" }),
},
{
- stepId: 'customize-banner',
- element: '.oe_overlay_options .oe_options',
+ stepId: 'customize-banner',
+ element: '.oe_overlay_options .oe_options',
placement: 'left',
- title: "Customize the banner",
- content: "Customize any block through this menu. Try to change the background of the banner.",
- template: self.popover({ next: "Continue" }),
+ title: "Customize the banner",
+ content: "Customize any block through this menu. Try to change the background of the banner.",
+ template: self.popover({ next: "Continue" }),
},
{
- stepId: 'add-three-cols',
- element: 'button[data-action=snippet]',
+ stepId: 'add-three-cols',
+ element: 'button[data-action=snippet]',
placement: 'bottom',
- title: "Add Another Block",
- content: "Let's add another building block to your page.",
- trigger: 'click',
+ title: "Add Another Block",
+ content: "Let's add another building block to your page.",
+ trigger: 'click',
},
{
- stepId: 'drag-three-columns',
- snippet: 'three-columns',
+ stepId: 'drag-three-columns',
+ snippet: 'three-columns',
placement: 'bottom',
- title: "Drag & Drop a Block",
- content: "Drag the '3 Columns' block and drop it below the banner.",
- trigger: 'drag',
+ title: "Drag & Drop a Block",
+ content: "Drag the '3 Columns' block and drop it below the banner.",
+ trigger: 'drag',
},
{
- stepId: 'activate-text-block-title',
- element: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
+ stepId: 'activate-text-block-title',
+ element: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
placement: 'top',
- title: "Edit an Area",
- content: "Select any area of the page to modify it. Click on this subtitle.",
+ title: "Edit an Area",
+ content: "Select any area of the page to modify it. Click on this subtitle.",
trigger: {
+ id: 'snippet-activated',
emitter: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
- id: 'snippet-activated',
},
},
{
- stepId: 'remove-text-block-title',
- element: '.oe_active .oe_snippet_remove',
+ stepId: 'remove-text-block-title',
+ element: '.oe_active .oe_snippet_remove',
placement: 'top',
- title: "Delete the Title",
- content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the trash can to delete the title.",
- trigger: 'click',
+ title: "Delete the Title",
+ content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the trash can to delete the title.",
+ trigger: 'click',
},
{
- stepId: 'save-changes',
- element: 'button[data-action=save]',
+ stepId: 'save-changes',
+ element: 'button[data-action=save]',
placement: 'right',
- title: "Save your modifications",
- content: "Publish your page by clicking on the 'Save' button.",
- trigger: 'click',
+ title: "Save your modifications",
+ content: "Publish your page by clicking on the 'Save' button.",
+ trigger: 'click',
},
{
- stepId: 'part-2',
- title: "Congratulation!",
- content: "Your homepage has been updated.",
- template: self.popover({ next: "Continue" }),
+ stepId: 'part-2',
+ title: "Congratulation!",
+ content: "Your homepage has been updated.",
+ template: self.popover({ next: "Continue" }),
},
{
- stepId: 'show-mobile',
- element: 'a[data-action=show-mobile-preview]',
+ stepId: 'show-mobile',
+ element: 'a[data-action=show-mobile-preview]',
placement: 'bottom',
- title: "Test Your Mobile Version",
- content: "Let's check how your homepage looks like on mobile devices.",
+ title: "Test Your Mobile Version",
+ content: "Let's check how your homepage looks like on mobile devices.",
trigger: {
+ id: 'shown.bs.modal',
emitter: $(document),
- id: 'shown.bs.modal',
},
},
{
- stepId: 'show-mobile-close',
- element: 'button[data-dismiss=modal]',
+ stepId: 'show-mobile-close',
+ element: 'button[data-dismiss=modal]',
placement: 'right',
- title: "Close Mobile Preview",
- content: "Scroll in the mobile preview to test the rendering. Once it's ok, close this dialog.",
- trigger: 'click',
+ title: "Close Mobile Preview",
+ content: "Scroll in the mobile preview to test the rendering. Once it's ok, close this dialog.",
+ trigger: 'click',
},
{
- stepId: 'show-tutorials',
- element: '#help-menu-button',
+ stepId: 'show-tutorials',
+ element: '#help-menu-button',
placement: 'left',
- title: "More Tutorials",
- content: "Get more tutorials through this 'Help' menu or click on the left 'Edit' button to continue modifying this page.",
- template: self.popover({ end: "Close Tutorial" }),
- trigger: 'click',
+ title: "More Tutorials",
+ content: "Get more tutorials through this 'Help' menu or click on the left 'Edit' button to continue modifying this page.",
+ template: self.popover({ end: "Close Tutorial" }),
+ trigger: 'click',
}
];
return this._super();
diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js
index fb869119352..ea3c7bcf5b5 100644
--- a/addons/website/static/src/js/website.tour.js
+++ b/addons/website/static/src/js/website.tour.js
@@ -139,7 +139,7 @@
},
redirect: function (url) {
url = url || new website.UrlParser(window.location.href);
- var path = (this.startPath && url.pathname !== this.startPath) ? this.startPath : url.pathname;
+ var path = (this.path && url.pathname !== this.path) ? this.path : url.pathname;
var search = url.activateTutorial(this.id);
var newUrl = path + search;
window.location.replace(newUrl);
@@ -333,9 +333,9 @@
}
}
var url = new website.UrlParser(window.location.href);
- if (tour.startPath && url.pathname !== tour.startPath) {
+ if (tour.path && url.pathname !== tour.path) {
window.localStorage.setItem(testId, actionSteps[0].stepId);
- window.location.href = tour.startPath;
+ window.location.href = tour.path;
} else {
var lastStepId = window.localStorage.getItem(testId);
var currentStep = actionSteps.shift();