[REM] point_of_sale: variable onlynumbers removed in devices.js, BarcodeReader, function connet
This commit is contained in:
committed by
Frédéric van der Essen
parent
87d669acdc
commit
3224a4f56c
@@ -677,7 +677,6 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
|
||||
var self = this;
|
||||
var code = "";
|
||||
var timeStamp = 0;
|
||||
var onlynumbers = true;
|
||||
var timeout = null;
|
||||
|
||||
this.handler = function(e){
|
||||
@@ -689,16 +688,11 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
|
||||
|
||||
if(timeStamp + 50 < new Date().getTime()){
|
||||
code = "";
|
||||
onlynumbers = true;
|
||||
}
|
||||
|
||||
timeStamp = new Date().getTime();
|
||||
clearTimeout(timeout);
|
||||
|
||||
if( e.which < 48 || e.which >= 58 ){ // not a number
|
||||
onlynumbers = false;
|
||||
}
|
||||
|
||||
code += String.fromCharCode(e.which);
|
||||
|
||||
// we wait for a while after the last input to be sure that we are not mistakingly
|
||||
@@ -710,7 +704,6 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
|
||||
self.scan(code);
|
||||
}
|
||||
code = "";
|
||||
onlynumbers = true;
|
||||
},100);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user