diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index e93c9774549..38f61a25c29 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -357,6 +357,7 @@ width:100%; height:100%; overflow: hidden; + overflow-y: auto; } .point-of-sale .product-list-container { position:absolute; @@ -893,6 +894,7 @@ width:100%; height:100%; overflow:hidden; + overflow-y: auto; } .point-of-sale .order{ diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 291c8bfdaae..0bf94d40926 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -214,9 +214,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa // freeing subwidgets - if(this.scrollbar){ - this.scrollbar.destroy(); - } for(var i = 0, len = this.orderlinewidgets.length; i < len; i++){ this.orderlinewidgets[i].destroy(); } @@ -243,30 +240,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, this)); this.update_numpad(); this.update_summary(); - - var position = this.scrollbar ? this.scrollbar.get_position() : 0; - var at_bottom = this.scrollbar ? this.scrollbar.is_at_bottom() : false; - - this.scrollbar = new module.ScrollbarWidget(this,{ - target_widget: this, - target_selector: '.order-scroller', - name: 'order', - track_bottom: true, - on_show: function(){ - self.$('.order-scroller').css({'width':'89%'},100); - }, - on_hide: function(){ - self.$('.order-scroller').css({'width':'100%'},100); - }, - }); - - this.scrollbar.replace(this.$('.placeholder-ScrollbarWidget')); - this.scrollbar.set_position(position); - - if( at_bottom ){ - this.scrollbar.set_position(Number.MAX_VALUE, false); - } - }, update_summary: function(){ var order = this.pos.get('selectedOrder'); @@ -609,9 +582,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var self = this; this._super(); - if(this.scrollbar){ - this.scrollbar.destroy(); - } var products = this.pos.get('products').models || []; _.each(products,function(product,i){ @@ -621,19 +591,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa $product.appendTo(self.$('.product-list')); }); - this.scrollbar = new module.ScrollbarWidget(this,{ - target_widget: this, - target_selector: '.product-list-scroller', - on_show: function(){ - self.$('.product-list-scroller').css({'padding-right':'62px'},100); - }, - on_hide: function(){ - self.$('.product-list-scroller').css({'padding-right':'0px'},100); - }, - }); - - this.scrollbar.replace(this.$('.placeholder-ScrollbarWidget')); - }, });