disable formatting for autoincrement

This commit is contained in:
yuri
2016-05-20 11:21:06 +03:00
parent fcf2929b5b
commit c3cb4619cf
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -38,6 +38,8 @@ Espo.define('views/fields/autoincrement', 'views/fields/int', function (Dep) {
readOnly: true,
disableFormatting: true,
parse: function (value) {
value = (value !== '') ? value : null;
if (value !== null) {
+3
View File
@@ -56,6 +56,9 @@ Espo.define('views/fields/float', 'views/fields/int', function (Dep) {
},
formatNumber: function (value) {
if (this.disableFormatting) {
return value;
}
if (value !== null) {
var parts = value.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
+3
View File
@@ -70,6 +70,9 @@ Espo.define('views/fields/int', 'views/fields/base', function (Dep) {
},
formatNumber: function (value) {
if (this.disableFormatting) {
return value;
}
if (value !== null) {
var stringValue = value.toString();
stringValue = stringValue.replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);