[IMP] website_crm

bzr revid: chm@openerp.com-20130702163157-d9a2woqai8dfr4co
This commit is contained in:
Christophe Matthieu
2013-07-02 18:31:57 +02:00
parent 702f955ecc
commit fcd975efa4
4 changed files with 8 additions and 2 deletions
@@ -21,6 +21,9 @@
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.oe_ecommerce .oe_product .oe_hidden {
visibility: hidden;
}
.oe_ecommerce .oe_product .oe_ecommerce_price {
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.44);
text-align: center;
@@ -4,6 +4,8 @@
font-family: "Lato"
font-size: 13px
.oe_product
.oe_hidden
visibility: hidden
.oe_ecommerce_price
+text-shadow(0px 1px 1px rgba(255, 255, 255, 0.44))
text-align: center
@@ -1,5 +1,6 @@
$(document).ready(function (){
$('.oe_ecommerce').on('click', '.oe_product .btn-success,.oe_product .btn-primary,.btn-inverse', function (e) {
var mycart = !!$('.oe_ecommerce .oe_mycart').size();
var $button = $(e.currentTarget);
var link = $button.hasClass('btn-inverse') ? '/shop/remove_cart' : '/shop/add_cart';
var $add = $button.parent().find('.btn-success,.btn-primary');
@@ -11,7 +12,7 @@ $(document).ready(function (){
$add.find('.oe_quantity').html(quantity);
$add.toggleClass('btn-primary', !quantity).toggleClass('btn-success', !!quantity);
$remove.toggleClass('oe_hidden', !quantity);
if (!quantity) {
if (mycart && !quantity) {
$button.parents('.oe_product:first').remove()
}
$('.oe_ecommerce .oe_total').replaceWith(''+result.totalHTML);
+1 -1
View File
@@ -125,7 +125,7 @@
<t t-call="website_sale.products"/>
</t>
<t t-call="website_sale.total"/>
<a t-if="order.order_line" href="/shop/customer"><button class="btn btn-success">Next stage</button></a>
<a t-if="order.order_line" href="/shop/customer"><button class="oe_mycart btn btn-success">Next stage</button></a>
</t>
</t>
</field>