var _t = instance.web._t;
var QWeb = instance.web.qweb;
+ // This widget makes sure that the scaling is disabled on mobile devices.
+ // Widgets that want to display fullscreen on mobile phone need to extend this
+ // widget.
+
+ module.MobileWidget = instance.web.Widget.extend({
+ start: function(){
+ if(!$('#oe-mobilewidget-viewport').length){
+ $('head').append('<meta id="oe-mobilewidget-viewport" name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">');
+ }
+ return this._super();
+ },
+ destroy: function(){
+ $('#oe-mobilewidget-viewport').remove();
+ return this._super();
+ },
+ });
+
module.PickingEditorWidget = instance.web.Widget.extend({
template: 'PickingEditorWidget',
init: function(parent,options){
},
});
- module.PickingMenuWidget = instance.web.Widget.extend({
+ module.PickingMenuWidget = module.MobileWidget.extend({
template: 'PickingMenuWidget',
init: function(parent, params){
this._super(parent,params);
});
},
start: function(){
+ this._super();
var self = this;
this.barcode_scanner.connect(function(barcode){
self.on_scan(barcode);
});
openerp.web.client_actions.add('stock.menu', 'instance.stock.PickingMenuWidget');
- module.PickingMainWidget = instance.web.Widget.extend({
+ module.PickingMainWidget = module.MobileWidget.extend({
template: 'PickingMainWidget',
init: function(parent,params){
this._super(parent,params);
this.loaded = this.load();
}
- window.pickwidget = this;
},
// load the picking data from the server. If picking_id is undefined, it will take the first picking
},
start: function(){
+ this._super();
var self = this;
instance.webclient.set_content_full_screen(true);
this.connect_numpad();