Commit e7df3090 authored by Hugo Adan [Vauxoo]'s avatar Hugo Adan [Vauxoo]
Browse files

[FIX] tour shop inherit instead of override

parent 5ab8c26f
......@@ -2,60 +2,28 @@
'use strict';
var _t = openerp._t;
var website = openerp.website;
website.ready().done(function() {
openerp.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: '#content-menu-button',
placement: 'left',
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 'New Product' to create it and manage its properties to boost your sales."),
popover: { fixed: true },
},
{
element: '.modal #editor_new_product input[type=text]',
sampleText: 'New Product',
placement: 'right',
title: _t("Choose name"),
content: _t("Enter a name for your new product then click 'Continue'."),
},
var shop = openerp.Tour.tours.shop.steps;
/* jshint loopfunc:true */
for (var r=0; r<shop.length; r++) {
if (shop[r].title === _t("Create Product")) {
shop.splice(r, 1,
{
waitNot: '.modal form#editor_new_product input[type=text]:not([value!=""])',
element: '.modal button.btn-primary:contains(Continue)',
placement: 'right',
title: _t("Create Product"),
content: _t("Click <em>Continue</em> to create the product."),
},
{
waitFor: 'body:has(button[data-action=save]:visible):has(.js_sale)',
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',
sampleText: '20.50',
placement: 'left',
title: _t("Change the price"),
content: _t("Edit the price of this product by clicking on the amount."),
},
]
});
});
}
);
break;
}
}
// remove all the steps after step "change the price"
for (r=0; r<shop.length; r++) {
if (shop[r].title === _t("Change the price")) {
shop.splice(r+1, 8);
break;
}
}
}());
......@@ -17,10 +17,6 @@
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website_product_filters/static/src/js/website_sale_tour_filters.js"></script>
<script type="text/javascript" src="/website_product_filters/static/src/js/test_attributes.js"></script>
</xpath>
</template>
<template id="assets_frontend_shop_tour_shop_tests" inherit_id="website_sale.assets_editor" name="Shop">
<xpath expr="//script[@src='/website_sale/static/src/js/website_sale_tour_shop.js']" position="after">
<script type="text/javascript" src="/website_product_filters/static/src/js/website_sale_tour_shop_inh.js"></script>
</xpath>
</template>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment