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 */
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'));