[IMP] web_decimal_numpad_dot: use the decimal_point defined in user language

pull/708/head
Roel Adriaans 2015-12-16 10:45:30 +01:00 committed by Pedro M. Baeza
parent 5cfd1a0f4b
commit 0b414fafdc
1 changed files with 9 additions and 3 deletions

View File

@ -11,12 +11,18 @@
} }
}, },
floatKeypress: function(e){ floatKeypress: function(e){
if(e.keyCode == '46' || e.charCode == '46'){ if (e.keyCode == '46' || e.charCode == '46') {
//Cancel the keypress // Cancel the keypress
e.preventDefault(); e.preventDefault();
// Add the comma to the value of the input field // 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);
}
}, },
}); });
})(); })();