[FIX] Fixed popovers in product tour
bzr revid: ddm@openerp.com-20131231104153-fy4sr9d7e0vwlef7
This commit is contained in:
@@ -17,26 +17,28 @@
|
||||
var self = this;
|
||||
self.steps = [
|
||||
{
|
||||
stepId: 'welcome-shop',
|
||||
title: "Welcome to your shop",
|
||||
content: "You successfully installed the e-commerce. This guide will help you to create your product and promote your sales.",
|
||||
template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
|
||||
backdrop: true,
|
||||
stepId: 'welcome-shop',
|
||||
title: "Welcome to your shop",
|
||||
content: "You successfully installed the e-commerce. This guide will help you to create your product and promote your sales.",
|
||||
template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
|
||||
backdrop: true,
|
||||
},
|
||||
{
|
||||
stepId: 'content-menu',
|
||||
element: '#content-menu-button',
|
||||
stepId: 'content-menu',
|
||||
element: '#content-menu-button',
|
||||
placement: 'left',
|
||||
title: "Create your first product",
|
||||
content: "Click here to add a new product.",
|
||||
trigger: 'click',
|
||||
title: "Create your first product",
|
||||
content: "Click here to add a new product.",
|
||||
template: self.popover({ fixed: true }),
|
||||
trigger: 'click',
|
||||
},
|
||||
{
|
||||
stepId: 'edit-entry',
|
||||
element: '#create-new-product',
|
||||
stepId: 'edit-entry',
|
||||
element: '#create-new-product',
|
||||
placement: 'left',
|
||||
title: "Create a new product",
|
||||
content: "Select 'New Product' to create it and manage its properties to boost your sales.",
|
||||
title: "Create a new product",
|
||||
content: "Select 'New Product' to create it and manage its properties to boost your sales.",
|
||||
template: self.popover({ fixed: true }),
|
||||
trigger: {
|
||||
modal: {
|
||||
stopOnClose: true,
|
||||
@@ -45,33 +47,33 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'enter-name',
|
||||
element: '.modal input[type=text]',
|
||||
stepId: 'enter-name',
|
||||
element: '.modal input[type=text]',
|
||||
placement: 'right',
|
||||
title: "Choose name",
|
||||
content: "Enter a name for your new product then click 'Continue'.",
|
||||
title: "Choose name",
|
||||
content: "Enter a name for your new product then click 'Continue'.",
|
||||
},
|
||||
{
|
||||
stepId: 'product-page',
|
||||
title: "New product created",
|
||||
content: "This page contains all the information related to the new product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
backdrop: true,
|
||||
stepId: 'product-page',
|
||||
title: "New product created",
|
||||
content: "This page contains all the information related to the new product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
backdrop: true,
|
||||
},
|
||||
{
|
||||
stepId: 'edit-price',
|
||||
element: '.product_price',
|
||||
stepId: 'edit-price',
|
||||
element: '.product_price',
|
||||
placement: 'left',
|
||||
title: "Change the public price",
|
||||
content: "Edit the sale price of this product by clicking on the amount. The price is the sale price used in all sale order when selling this product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
title: "Change the public price",
|
||||
content: "Edit the sale price of this product by clicking on the amount. The price is the sale price used in all sale order when selling this product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
},
|
||||
{
|
||||
stepId: 'update-image',
|
||||
element: '#wrap img.img:first',
|
||||
stepId: 'update-image',
|
||||
element: '#wrap img.img:first',
|
||||
placement: 'top',
|
||||
title: "Update image",
|
||||
content: "Click here to set an image describing your product.",
|
||||
title: "Update image",
|
||||
content: "Click here to set an image describing your product.",
|
||||
triggers: function () {
|
||||
function registerClick () {
|
||||
$('button.hover-edition-button').one('click', function () {
|
||||
@@ -84,12 +86,12 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'upload-image',
|
||||
element: 'button.filepicker',
|
||||
stepId: 'upload-image',
|
||||
element: 'button.filepicker',
|
||||
placement: 'left',
|
||||
title: "Upload image",
|
||||
content: "Click on 'Upload an image from your computer' to pick an image describing your product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
title: "Upload image",
|
||||
content: "Click on 'Upload an image from your computer' to pick an image describing your product.",
|
||||
template: self.popover({ next: "OK" }),
|
||||
triggers: function () {
|
||||
$(document).on('hide.bs.modal', function () {
|
||||
self.moveToStep('add-block');
|
||||
@@ -97,51 +99,54 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
stepId: 'save-image',
|
||||
element: 'button.save',
|
||||
stepId: 'save-image',
|
||||
element: 'button.save',
|
||||
placement: 'right',
|
||||
title: "Save the image",
|
||||
content: "Click 'Save Changes' to add the image to the product decsription.",
|
||||
title: "Save the image",
|
||||
content: "Click 'Save Changes' to add the image to the product decsription.",
|
||||
},
|
||||
{
|
||||
stepId: 'add-block',
|
||||
element: 'button[data-action=snippet]',
|
||||
stepId: 'add-block',
|
||||
element: 'button[data-action=snippet]',
|
||||
placement: 'bottom',
|
||||
title: "Describe the product for your audience",
|
||||
content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.",
|
||||
trigger: 'click',
|
||||
title: "Describe the product for your audience",
|
||||
content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.",
|
||||
template: self.popover({ fixed: true }),
|
||||
trigger: 'click',
|
||||
},
|
||||
{
|
||||
stepId: 'drag-big-picture',
|
||||
snippet: 'big-picture',
|
||||
stepId: 'drag-big-picture',
|
||||
snippet: 'big-picture',
|
||||
placement: 'bottom',
|
||||
title: "Drag & Drop a block",
|
||||
content: "Drag the 'Big Picture' block and drop it in your page.",
|
||||
trigger: 'drag',
|
||||
title: "Drag & Drop a block",
|
||||
content: "Drag the 'Big Picture' block and drop it in your page.",
|
||||
template: self.popover({ fixed: true }),
|
||||
trigger: 'drag',
|
||||
},
|
||||
{
|
||||
stepId: 'save-changes',
|
||||
element: 'button[data-action=save]',
|
||||
stepId: 'save-changes',
|
||||
element: 'button[data-action=save]',
|
||||
placement: 'right',
|
||||
title: "Save your modifications",
|
||||
content: "Once you click on save, your product is updated.",
|
||||
trigger: 'click',
|
||||
title: "Save your modifications",
|
||||
content: "Once you click on save, your product is updated.",
|
||||
template: self.popover({ fixed: true }),
|
||||
trigger: 'click',
|
||||
|
||||
},
|
||||
{
|
||||
stepId: 'publish-product',
|
||||
element: '.js_publish_management button.js_publish_btn.btn-danger',
|
||||
stepId: 'publish-product',
|
||||
element: '.js_publish_management button.js_publish_btn.btn-danger',
|
||||
placement: 'top',
|
||||
title: "Publish your product",
|
||||
content: "Click to publish your product so your customers can see it.",
|
||||
trigger: 'click',
|
||||
title: "Publish your product",
|
||||
content: "Click to publish your product so your customers can see it.",
|
||||
trigger: 'click',
|
||||
},
|
||||
{
|
||||
stepId: 'congratulations',
|
||||
title: "Congratulations",
|
||||
content: "Congratulations! You just created and published your first product.",
|
||||
template: self.popover({ end: "Close Tutorial" }),
|
||||
backdrop: true,
|
||||
stepId: 'congratulations',
|
||||
title: "Congratulations",
|
||||
content: "Congratulations! You just created and published your first product.",
|
||||
template: self.popover({ end: "Close Tutorial" }),
|
||||
backdrop: true,
|
||||
},
|
||||
];
|
||||
return this._super();
|
||||
|
||||
Reference in New Issue
Block a user