Add test button
bzr revid: fva@openerp.com-20120426112655-s6j7qt098ptecwwf
This commit is contained in:
parent
2416f64ca2
commit
67341a8cef
|
@ -570,11 +570,17 @@ function openerp_pos_widgets(module, instance){ //module is instance.point_of_sa
|
|||
this._super(parent, options);
|
||||
this.label = options.label || 'button';
|
||||
this.rightalign = options.rightalign || false;
|
||||
this.click_action = options.click;
|
||||
if(options.icon){
|
||||
this.icon = options.icon;
|
||||
this.template = 'pos-action-button-with-icon';
|
||||
}
|
||||
},
|
||||
start: function(){
|
||||
if(this.click_action){
|
||||
this.$element.click(_.bind(this.click_action, this));
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
module.ActionbarWidget = instance.web.Widget.extend({
|
||||
|
@ -940,6 +946,15 @@ function openerp_pos_widgets(module, instance){ //module is instance.point_of_sa
|
|||
this.onscreenKeyboard.appendTo($(".point-of-sale #content"));
|
||||
|
||||
this.barcodeReader = new module.BarcodeReader({'pos': self.pos });
|
||||
|
||||
this.actionBar = new module.ActionbarWidget(null);
|
||||
this.actionBar.appendTo($(".point-of-sale #content"));
|
||||
this.actionBar.addNewButton('left',{
|
||||
label : 'Hello World',
|
||||
icon : '/point_of_sale/static/src/img/icons/png48/face-monkey.png',
|
||||
click : function(){ console.log("Hello World!"); }
|
||||
});
|
||||
|
||||
},
|
||||
createNewOrder: function() {
|
||||
var newOrder;
|
||||
|
|
Loading…
Reference in New Issue