From 7f0e721cc105edcdc1c4f81981adca7a6bb1322f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Wed, 6 Nov 2013 17:17:23 +0100 Subject: [PATCH] [IMP] point_of_sale: more css adaptations for iPad / android + a few bug correction along the way bzr revid: fva@openerp.com-20131106161723-vus7amgc6cfw3bzr --- addons/point_of_sale/point_of_sale.py | 1 + addons/point_of_sale/point_of_sale_view.xml | 1 + .../point_of_sale/static/src/css/keyboard.css | 4 +- addons/point_of_sale/static/src/css/pos.css | 98 ++++++++++++------ .../static/src/img/scroll-down.png | Bin 0 -> 357 bytes .../static/src/img/scroll-up.png | Bin 0 -> 303 bytes addons/point_of_sale/static/src/js/models.js | 4 +- addons/point_of_sale/static/src/js/screens.js | 49 +++++++-- .../static/src/js/widget_keyboard.js | 17 +-- addons/point_of_sale/static/src/js/widgets.js | 5 +- 10 files changed, 131 insertions(+), 48 deletions(-) create mode 100644 addons/point_of_sale/static/src/img/scroll-down.png create mode 100644 addons/point_of_sale/static/src/img/scroll-up.png diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index d32b8e91d3a..344eddb5f63 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -64,6 +64,7 @@ class pos_config(osv.osv): 'iface_vkeyboard' : fields.boolean('Virtual KeyBoard Interface'), 'iface_print_via_proxy' : fields.boolean('Print via Proxy'), 'iface_invoicing': fields.boolean('Invoicing',help='Enables invoice generation from the Point of Sale'), + 'iface_big_scrollbars': fields.boolean('Large Scrollbars',help='For imprecise industrial touchscreens'), 'state' : fields.selection(POS_CONFIG_STATE, 'Status', required=True, readonly=True), 'sequence_id' : fields.many2one('ir.sequence', 'Order IDs Sequence', readonly=True, diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 7202b57a1eb..11893bd966e 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -796,6 +796,7 @@ + diff --git a/addons/point_of_sale/static/src/css/keyboard.css b/addons/point_of_sale/static/src/css/keyboard.css index d060735be8d..36cbea09368 100644 --- a/addons/point_of_sale/static/src/css/keyboard.css +++ b/addons/point_of_sale/static/src/css/keyboard.css @@ -28,7 +28,6 @@ background-color: #DDD; font-size: 12px; line-height:40px; - border: 1px solid #CCC; -webkit-border-radius: 5px; position:absolute; top:0; @@ -41,13 +40,14 @@ background-color: #fff; border: 1px solid #f0f0f0; top:0; + cursor: pointer; -moz-border-radius: 5px; -webkit-border-radius: 5px; -webkit-transition-property: top, background-color; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: linear; } -.pos .keyboard li:hover { +.pos .keyboard li:active{ position: relative; top: 2px; left: 0px; diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 8183132ee35..f1a0ea84b46 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -217,6 +217,7 @@ margin-right:0px; border: 1px solid #353A7E; background: #7f82ac; + text-shadow: none; } .pos .pos-rightheader button.square{ @@ -410,7 +411,7 @@ width:100%; height:100%; overflow: hidden; - overflow-y: scroll; + overflow-y: auto; -webkit-overflow-scrolling: touch; } @@ -598,6 +599,7 @@ line-height: 13px; background: #7f82ac; padding: 2px 5px; + border-radius: 2px; } .pos .product .product-name { @@ -633,6 +635,7 @@ bottom:0px; width:100%; overflow: auto; + -webkit-overflow-scrolling: touch; } .pos .screen header h2 { margin-top: 0px; @@ -646,8 +649,6 @@ margin-left: auto; margin-right: auto; margin-top: 50px; - padding: 40px; - background-color: #f8f8f8; text-align: center; } .pos .dialog p{ @@ -828,14 +829,11 @@ .pos .scale-screen .display{ position:relative; - width:600px; + width: 550px; height:190px; margin-top: 100px; margin-left: auto; margin-right: auto; - padding: 40px; - background: #f1f1f1; - border-top: 1px solid #efefef; } .pos .scale-screen .product-picture { @@ -854,11 +852,13 @@ background:#fff; border: 1px solid #fff; + border-radius: 3px; + box-shadow: 0px 2px rgb(228, 228, 228); } .pos .scale-screen .product-picture img{ - max-width: 178px; - max-height:178px; + max-width: 178px; + max-height: 178px; vertical-align: middle; cursor:pointer; } @@ -872,40 +872,43 @@ line-height:1; color:white; background: #7f82ac; - padding: 2px 5px; + padding: 4px 5px; + border-radius: 3px; cursor:pointer; } .pos .scale-screen .product-name { position: absolute; - left:40px; - top:50px; - height:50px; - font-size:36px; - line-height:50px; - text-align:right; - right:275px; + left: 0px; + right: 210px; + top: 10px; + height: 50px; + font-size: 36px; + line-height: 50px; + text-align: right; color: #8d8d8d; overflow: hidden; text-overflow: ellipsis; } .pos .scale-screen .weight{ - position: absolute; - left: 40px; - height: 90px; - bottom: 55px; - right: 260px; - padding: 6px; - padding-right: 33px; - padding-top: 11px; - background: white; - + position: absolute; + left: 0; + top: 80px; + height: 90px; + bottom: 55px; + right: 210px; + padding: 6px; + padding-right: 33px; + padding-top: 11px; + background: white; + border-radius: 3px; + box-shadow: 0px 2px rgb(228, 228, 228) inset; } .pos .scale-screen .weight p{ display: inline-block; text-align:right; line-height: 90px; - font-size: 70px; + font-size: 56px; width: 100%; height: 100%; margin: 0; @@ -930,6 +933,8 @@ font-weight:bold; background-color: #F0EEEE; border: 1px solid #E0DDDD; + border-radius: 3px; + box-shadow: 0px 10px 20px rgba(0,0,0,0.4); z-index:1150; } @@ -947,7 +952,7 @@ width:100%; height:100%; overflow:hidden; - overflow-y: scroll; + overflow-y: auto; -webkit-overflow-scrolling: touch; } @@ -989,7 +994,7 @@ border-color:#777; } .pos .order .summary .line .subentry{ - font-size: 10px; + font-size: 14px; font-weight: normal; text-align: center; } @@ -1112,6 +1117,9 @@ -webkit-transition-timing-function: ease-out; } +.pos .pos-actionbar .button.disabled{ + opacity: 0.5; +} .pos .pos-actionbar .button.disabled:active{ border: 1px solid #cacaca; color: #555; @@ -1220,6 +1228,8 @@ font-size:20px; font-weight:bold; background-color: #F0EEEE; + border-radius: 3px; + box-shadow: 0px 10px 20px rgba(0,0,0,0.4); z-index:1200; } .pos .popup .footer{ @@ -1292,6 +1302,34 @@ min-height: 30px; } +.pos.big-scrollbars *::-webkit-scrollbar{ + width: 40px; + height: 40px; +} +.pos.big-scrollbars *::-webkit-scrollbar-track{ + background: rgb(224,224,224); + border-left: none; +} +.pos.big-scrollbars *::-webkit-scrollbar-thumb{ + background: rgb(168,168,168); + min-height: 40px; + border-radius: 3px; +} +.pos.big-scrollbars *::-webkit-scrollbar-button{ + width: 40px; + height: 40px; + border-radius: 3px; + background: rgb(210,210,210); + background-size: cover; +} +.pos.big-scrollbars *::-webkit-scrollbar-button:decrement{ + background-image: url('../img/scroll-up.png'); +} +.pos.big-scrollbars *::-webkit-scrollbar-button:increment{ + background-image: url('../img/scroll-down.png'); +} + + /* ********* Unsupported Browser Page ********* */ .pos .not-supported-browser{ diff --git a/addons/point_of_sale/static/src/img/scroll-down.png b/addons/point_of_sale/static/src/img/scroll-down.png new file mode 100644 index 0000000000000000000000000000000000000000..5fd075891572fd17bde6f2abeecba83ed8a81625 GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTCmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt+!{T^vI) z8sFa7=zBOo!u8=}6ns~o@SJxN$lar)xe=kn0 z4BGij>?Pw`QH5B>OBlr6RS$1TKj7TKs`fALSV@tNp3QyP_s05LpGK^nf9`!`?6#Z? z)&=*@yX@K0_nvh|^Np_(_k|mF1@70A_muGdjyXwCB zzVKM_RAJ27xmq*k%(uRnEmJ0x1)z& z7b)&Dw7d4qVM$+nuZ;Zd