ref
This commit is contained in:
@@ -117,7 +117,7 @@ define('views/fields/currency', 'views/fields/float', function (Dep) {
|
||||
},
|
||||
|
||||
formatNumber: function (value) {
|
||||
if (this.mode === 'list' || this.mode === 'detail' || this.mode === 'listLink') {
|
||||
if (this.isReadMode()) {
|
||||
return this.formatNumberDetail(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,15 +66,19 @@ define('views/fields/float', 'views/fields/int', function (Dep) {
|
||||
return this.formatNumberDetail(value);
|
||||
}
|
||||
|
||||
if (value !== null) {
|
||||
var parts = value.toString().split(".");
|
||||
return this.formatNumberEdit(value);
|
||||
},
|
||||
|
||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
return parts.join(this.decimalMark);
|
||||
formatNumberEdit: function (value) {
|
||||
if (value === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return '';
|
||||
let parts = value.toString().split(".");
|
||||
|
||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
return parts.join(this.decimalMark);
|
||||
},
|
||||
|
||||
formatNumberDetail: function (value) {
|
||||
|
||||
@@ -129,15 +129,19 @@ define('views/fields/int', 'views/fields/base', function (Dep) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (value !== null) {
|
||||
var stringValue = value.toString();
|
||||
return this.formatNumberEdit(value);
|
||||
},
|
||||
|
||||
stringValue = stringValue.replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
return stringValue;
|
||||
formatNumberEdit: function (value) {
|
||||
if (value === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return '';
|
||||
let stringValue = value.toString();
|
||||
|
||||
stringValue = stringValue.replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
return stringValue;
|
||||
},
|
||||
|
||||
setupSearch: function () {
|
||||
|
||||
Reference in New Issue
Block a user