mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_decimal_numpad_dot: use the decimal_point defined in user language
This commit is contained in:
@@ -11,12 +11,18 @@
|
||||
}
|
||||
},
|
||||
floatKeypress: function(e){
|
||||
if(e.keyCode == '46' || e.charCode == '46'){
|
||||
//Cancel the keypress
|
||||
if (e.keyCode == '46' || e.charCode == '46') {
|
||||
// Cancel the keypress
|
||||
e.preventDefault();
|
||||
// Add the comma to the value of the input field
|
||||
this.$("input").val(this.$("input").val() + ',');
|
||||
this.$("input").val(this.$("input").val() + instance.web._t.database.parameters.decimal_point);
|
||||
}
|
||||
else if (e.keyCode == '44' || e.charCode == '44') {
|
||||
// Cancel the keypress
|
||||
e.preventDefault();
|
||||
// Add the comma to the value of the input field
|
||||
this.$("input").val(this.$("input").val() + instance.web._t.database.parameters.thousands_sep);
|
||||
}
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user