[IMP] point_of_sale: redesign of the empty order.
This commit is contained in:
@@ -1683,12 +1683,16 @@ td {
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
}
|
||||
|
||||
.pos .order .empty{
|
||||
text-align:center;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 5px;
|
||||
color:#999;
|
||||
font-weight: normal;
|
||||
.pos .order .order-empty {
|
||||
text-align: center;
|
||||
margin: 48px;
|
||||
color: #DDD;
|
||||
}
|
||||
.pos .order .order-empty .fa {
|
||||
font-size: 64px;
|
||||
}
|
||||
.pos .order .order-empty h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.pos .order .summary{
|
||||
|
||||
@@ -522,6 +522,10 @@ openerp.point_of_sale.load_screens = function load_screens(instance, module){ //
|
||||
},
|
||||
update_summary: function(){
|
||||
var order = this.pos.get_order();
|
||||
if (!order.get_orderlines().length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var total = order ? order.get_total_with_tax() : 0;
|
||||
var taxes = order ? total - order.get_total_without_tax() : 0;
|
||||
|
||||
|
||||
@@ -1097,21 +1097,23 @@
|
||||
<div class="order-container">
|
||||
<div class="order-scroller touch-scrollable">
|
||||
<div class="order">
|
||||
<ul class="orderlines">
|
||||
<t t-if="orderlines.length === 0">
|
||||
<li class="orderline empty">
|
||||
Your shopping cart is empty
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<div class="summary clearfix">
|
||||
<div t-attf-class="line #{orderlines.length === 0 ? 'empty' : ''}">
|
||||
<div class='entry total'>
|
||||
<span class="label">Total: </span> <span class="value">0.00 €</span>
|
||||
<div class='subentry'>Taxes: <span class="value">0.00€</span></div>
|
||||
<t t-if="orderlines.length === 0" >
|
||||
<div class='order-empty'>
|
||||
<i class='fa fa-shopping-cart' />
|
||||
<h1>Your shopping cart is empty</h1>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="orderlines.length > 0">
|
||||
<ul class="orderlines"></ul>
|
||||
<div class="summary clearfix">
|
||||
<div class="line">
|
||||
<div class='entry total'>
|
||||
<span class="label">Total: </span> <span class="value">0.00 €</span>
|
||||
<div class='subentry'>Taxes: <span class="value">0.00€</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user