this.product_categories_widget.reset_category();
this.pos_widget.order_widget.set_numpad_state(this.pos_widget.numpad.state);
- if(this.pos.iface_vkeyboard){
- this.pos_widget.onscreen_keyboard.connect();
- }
if(this.pos_widget.screen_selector.current_mode === 'client'){
this.add_action_button({
this._super();
this.pos_widget.order_widget.set_numpad_state(null);
this.pos_widget.payment_screen.set_numpad_state(null);
+ if(this.pos.iface_vkeyboard && this.pos_widget.onscreen_keyboard){
+ this.pos_widget.onscreen_keyboard.hide();
+ }
},
});
}
this.input_selector = options.input_selector || '.searchbox input';
-
- //show the keyboard when the input zone is clicked.
- $(this.input_selector).focus(function(){self.show();});
+ this.$target = null;
//Keyboard state
this.capslock = false;
this.numlock = false;
},
- connect : function(){
+ connect : function($target){
var self = this;
- $(this.input_selector).focus(function(){self.show();});
+ this.$target = $target;
+ $target.focus(function(){self.show();});
},
// Write a character to the input zone
writeCharacter: function(character){
- var $input = $(this.input_selector);
+ var $input = this.$target
$input[0].value += character;
$input.keydown();
$input.keyup();
// Removes the last character from the input zone.
deleteCharacter: function(){
- var $input = $(this.input_selector);
+ var $input = this.$target;
var input_value = $input[0].value;
$input[0].value = input_value.substr(0, input_value.length - 1);
$input.keydown();
// Clears the content of the input zone.
deleteAllCharacters: function(){
- var $input = $(this.input_selector);
+ var $input = this.$target;
$input[0].value = "";
$input.keydown();
$input.keyup();
self.renderElement();
self.search_and_categories(category);
});
+ if(this.pos.iface_vkeyboard && this.pos_widget.onscreen_keyboard){
+ this.pos_widget.onscreen_keyboard.connect(this.$('.searchbox input'));
+ }
this.search_and_categories();
},