Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
vauxoo-dev
addons-vauxoo
Commits
e7df3090
Commit
e7df3090
authored
May 19, 2016
by
Hugo Adan [Vauxoo]
Browse files
[FIX] tour shop inherit instead of override
parent
5ab8c26f
Changes
2
Hide whitespace changes
Inline
Side-by-side
website_product_filters/static/src/js/website_sale_tour_shop_inh.js
View file @
e7df3090
...
...
@@ -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
;
}
}
}());
website_product_filters/views/assets.xml
View file @
e7df3090
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment