[FIX] point_of_sale: it was too easy to accidentally hit the close button on ipads, made it double click only
This commit is contained in:
parent
8d32f80fe3
commit
4f55c9d68d
|
@ -399,6 +399,11 @@ td {
|
|||
background: rgba(0,0,0,0.2);
|
||||
color:#EEE;
|
||||
}
|
||||
.pos .pos-rightheader .header-button.confirm {
|
||||
background: #F03F00;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* c) The notifications indicator */
|
||||
|
||||
|
|
|
@ -1131,7 +1131,21 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
|
||||
this.close_button = new module.HeaderButtonWidget(this,{
|
||||
label: _t('Close'),
|
||||
action: function(){ self.close(); },
|
||||
action: function(){
|
||||
var self = this;
|
||||
if (!this.confirmed) {
|
||||
this.$el.addClass('confirm');
|
||||
this.$el.text(_t('Confirm'));
|
||||
this.confirmed = setTimeout(function(){
|
||||
self.$el.removeClass('confirm');
|
||||
self.$el.text(_t('Close'));
|
||||
self.confirmed = false;
|
||||
},900);
|
||||
} else {
|
||||
clearTimeout(this.confirmed);
|
||||
this.pos_widget.close();
|
||||
}
|
||||
},
|
||||
});
|
||||
this.close_button.appendTo(this.$('.pos-rightheader'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue