[REF] *: BS4, restore some button style
* website_sale_comparison, website_sale_wishlist <a/> elements without any href are now styled differently with BS4... but we should never use one of those. Replaced those by <button/> elements.
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
|
||||
<template id="add_to_compare" inherit_id="website_sale.products_item" active="True" customize_show="True" name="Comparison List" priority="22">
|
||||
<xpath expr="//div[hasclass('product_price')]" position="inside">
|
||||
<a role="button" class="d-none d-md-inline-block btn btn-secondary btn-sm o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_comparelist"><span class="fa fa-exchange"></span></a>
|
||||
<button type="button" role="button" class="d-none d-md-inline-block btn btn-secondary btn-sm o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_comparelist"><span class="fa fa-exchange"></span></button>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="product_add_to_compare" name='Add to comparison in product page' inherit_id="website_sale.product" priority="8">
|
||||
<xpath expr="//a[@id='add_to_cart']" position="after">
|
||||
<t t-if="product.env.ref('website_sale_comparison.add_to_compare').active">
|
||||
<a role="button" class="d-none d-md-inline-block btn btn-secondary btn-lg mt8 o_add_compare_dyn" title="Compare" aria-label="Compare" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_comparelist"><span class="fa fa-exchange"></span></a>
|
||||
<button type="button" role="button" class="d-none d-md-inline-block btn btn-secondary btn-lg mt8 o_add_compare_dyn" title="Compare" aria-label="Compare" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_comparelist"><span class="fa fa-exchange"></span></button>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
@@ -21,7 +21,7 @@ tour.register('shop_wishlist', {
|
||||
},
|
||||
{
|
||||
content: "remove first item in whishlist",
|
||||
trigger: 'a.o_wish_rm:first',
|
||||
trigger: '.o_wish_rm:first',
|
||||
},
|
||||
{
|
||||
content: "go back to the store",
|
||||
@@ -76,7 +76,7 @@ tour.register('shop_wishlist', {
|
||||
},
|
||||
{
|
||||
content: "remove Customizable Desk",
|
||||
trigger: 'tr:contains("Customizable Desk") a.o_wish_rm:first',
|
||||
trigger: 'tr:contains("Customizable Desk") .o_wish_rm:first',
|
||||
},
|
||||
{
|
||||
content: "check that wishlist contains 1 item",
|
||||
@@ -89,7 +89,7 @@ tour.register('shop_wishlist', {
|
||||
},
|
||||
{
|
||||
content: "add item to cart",
|
||||
trigger: 'a.o_wish_add:eq(1)',
|
||||
trigger: '.o_wish_add:eq(1)',
|
||||
},
|
||||
{
|
||||
content: "check that cart contains 1 item",
|
||||
@@ -107,7 +107,7 @@ tour.register('shop_wishlist', {
|
||||
},
|
||||
{
|
||||
content: "add last item to cart",
|
||||
trigger: 'a.o_wish_add:eq(1)',
|
||||
trigger: '.o_wish_add:eq(1)',
|
||||
},
|
||||
{
|
||||
content: "check that user is redirect - wishlist is empty",
|
||||
|
||||
@@ -27,11 +27,11 @@ var ProductWishlist = Widget.extend({
|
||||
});
|
||||
|
||||
if ($('.wishlist-section').length) {
|
||||
$('.wishlist-section a.o_wish_rm').on('click', function (e){ self.wishlist_rm(e, false); });
|
||||
$('.wishlist-section a.o_wish_add').on('click', function (e){
|
||||
$('.wishlist-section a.o_wish_add').addClass('disabled');
|
||||
$('.wishlist-section .o_wish_rm').on('click', function (e){ self.wishlist_rm(e, false); });
|
||||
$('.wishlist-section .o_wish_add').on('click', function (e){
|
||||
$('.wishlist-section .o_wish_add').addClass('disabled');
|
||||
self.wishlist_add_or_mv(e).then(function(o) {
|
||||
$('.wishlist-section a.o_wish_add').removeClass('disabled');
|
||||
$('.wishlist-section .o_wish_add').removeClass('disabled');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<template id="add_to_wishlist" inherit_id="website_sale.products_item" active="True" customize_show="True" name="Wishlist" priority="20">
|
||||
<xpath expr="//div[hasclass('product_price')]" position="inside">
|
||||
<t t-set="in_wish" t-value="product.product_variant_ids & request.env['product.wishlist'].current().mapped('product_id')"/>
|
||||
<a role="button" class="btn btn-secondary btn-sm o_add_wishlist" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
<button type="button" role="button" class="btn btn-secondary btn-sm o_add_wishlist" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"></span></button>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<xpath expr="//a[@id='add_to_cart']" position="after">
|
||||
<t t-if="product.env.ref('website_sale_wishlist.add_to_wishlist').active">
|
||||
<t t-set="in_wish" t-value="product.product_variant_ids & request.env['product.wishlist'].current().mapped('product_id')"/>
|
||||
<a role="button" class="btn btn-secondary btn-lg mt8 o_add_wishlist_dyn" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"></span></a>
|
||||
<button type="button" role="button" class="btn btn-secondary btn-lg mt8 o_add_wishlist_dyn" t-att-disabled='in_wish or None' title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"></span></button>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
@@ -62,7 +62,7 @@
|
||||
<td class='text-left'>
|
||||
<strong><a t-att-href="'/shop/product/%s' % slug(wish.product_id.product_tmpl_id)"><t t-esc="wish.product_id.display_name" /></a></strong>
|
||||
<small class='d-none d-md-block'><p t-field="wish.product_id.description_sale" class="text-muted"/></small>
|
||||
<a class="o_wish_rm no-decoration"><small><i class='fa fa-trash-o'></i> Remove</small></a>
|
||||
<button type="button" class="btn btn-link o_wish_rm no-decoration"><small><i class='fa fa-trash-o'></i> Remove</small></button>
|
||||
</td>
|
||||
<td style='width:80px'>
|
||||
<t t-if='wish.price_new != wish.price'>
|
||||
@@ -73,7 +73,7 @@
|
||||
</td>
|
||||
<td class='text-center td-wish-btn'>
|
||||
<input name="product_id" t-att-value="wish.product_id.id" type="hidden"/>
|
||||
<a role="button" class="btn btn-secondary btn-block o_wish_add mb4" >Add <span class='d-none d-md-inline'>to Cart</span></a>
|
||||
<button type="button" role="button" class="btn btn-secondary btn-block o_wish_add mb4" >Add <span class='d-none d-md-inline'>to Cart</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user