[FIX] point_of_sale: activate the font 'Lato' & prevent rubberbanding on application body when possible
bzr revid: fva@openerp.com-20131217151550-i8wd88qby6gjaclj
This commit is contained in:
parent
e4ab24115a
commit
68f8dd7e23
|
@ -32,7 +32,7 @@ html_template = """<!DOCTYPE html>
|
|||
<link rel="apple-touch-icon" sizes="152x152" href="/point_of_sale/static/src/img/touch-icon-ipad-retina.png">
|
||||
|
||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
||||
<!-- <link rel="stylesheet" href="/point_of_sale/static/src/fonts/lato/stylesheet.css" /> -->
|
||||
<link rel="stylesheet" href="/point_of_sale/static/src/fonts/lato/stylesheet.css" />
|
||||
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos.css" />
|
||||
<link rel="stylesheet" href="/point_of_sale/static/src/css/keyboard.css" />
|
||||
%(js)s
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
html {
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
font-family: sans-serif;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0px;
|
||||
|
@ -41,6 +42,7 @@ td {
|
|||
box-shadow: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
.pos button:hover{
|
||||
background: default;
|
||||
|
|
|
@ -878,6 +878,22 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
FastClick.attach(document.body);
|
||||
|
||||
},
|
||||
|
||||
disable_rubberbanding: function(){
|
||||
// prevent the pos body from being scrollable.
|
||||
document.body.addEventListener('touchmove',function(event){
|
||||
console.log('touchmove_prevent',event);
|
||||
var node = event.target;
|
||||
while(node){
|
||||
if(node.classList && node.classList.contains('touch-scrollable')){
|
||||
console.log('not prevented');
|
||||
return;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
|
||||
start: function() {
|
||||
var self = this;
|
||||
|
@ -894,11 +910,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
$('.oe_web_client').off();
|
||||
$('.openerp_webclient_container').off();
|
||||
|
||||
/*this.el.addEventHandler('click',function(event){
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
});*/
|
||||
|
||||
self.build_currency_template();
|
||||
self.renderElement();
|
||||
|
||||
|
@ -1085,6 +1096,8 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
this.debug_widget = new module.DebugWidget(this);
|
||||
this.debug_widget.appendTo(this.$('.pos-content'));
|
||||
}
|
||||
|
||||
this.disable_rubberbanding();
|
||||
},
|
||||
|
||||
changed_pending_operations: function () {
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
</t>
|
||||
|
||||
<t t-name="PaypadWidget">
|
||||
<div class="paypad">
|
||||
<div class="paypad touch-scrollable">
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
@ -197,7 +197,7 @@
|
|||
|
||||
<t t-name="ProductListWidget">
|
||||
<div class='product-list-container'>
|
||||
<div class="product-list-scroller">
|
||||
<div class="product-list-scroller touch-scrollable">
|
||||
<div class="product-list">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -253,7 +253,7 @@
|
|||
</t>
|
||||
|
||||
<t t-name="PaymentScreenWidget">
|
||||
<div class="payment-screen screen">
|
||||
<div class="payment-screen screen touch-scrollable">
|
||||
<div class="pos-payment-container">
|
||||
<div class='payment-due-total'></div>
|
||||
<div class='payment-lines'></div>
|
||||
|
@ -282,7 +282,7 @@
|
|||
</t>
|
||||
|
||||
<t t-name="ReceiptScreenWidget">
|
||||
<div class="receipt-screen screen" >
|
||||
<div class="receipt-screen screen touch-scrollable" >
|
||||
<div class="pos-step-container">
|
||||
<div class="pos-receipt-container">
|
||||
</div>
|
||||
|
@ -305,7 +305,7 @@
|
|||
|
||||
|
||||
<t t-name="ScanProductScreenWidget">
|
||||
<div class="scan-product-screen screen">
|
||||
<div class="scan-product-screen screen touch-scrollable">
|
||||
<header class='rightpane-header'><h2>Please scan an item</h2></header>
|
||||
<img src="/point_of_sale/static/src/img/scan.png" />
|
||||
</div>
|
||||
|
@ -444,7 +444,7 @@
|
|||
|
||||
<t t-name="OrderWidget">
|
||||
<div class="order-container">
|
||||
<div class="order-scroller">
|
||||
<div class="order-scroller touch-scrollable">
|
||||
<div class="order">
|
||||
<ul class="orderlines">
|
||||
<t t-if="orderlines.length === 0">
|
||||
|
|
Loading…
Reference in New Issue