@magic-xpa/gui 4.900.0-dev490.48 → 4.900.0-dev490.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/Commands.mjs +2 -4
- package/esm2020/src/management/gui/FieldValidator.mjs +2 -2
- package/esm2020/src/management/gui/MgControlBase.mjs +3 -7
- package/fesm2015/magic-xpa-gui.mjs +4 -10
- package/fesm2015/magic-xpa-gui.mjs.map +1 -1
- package/fesm2020/magic-xpa-gui.mjs +4 -10
- package/fesm2020/magic-xpa-gui.mjs.map +1 -1
- package/package.json +2 -2
- package/src/Commands.d.ts +1 -1
|
@@ -1238,13 +1238,11 @@ class Commands {
|
|
|
1238
1238
|
guiCommand.number = num;
|
|
1239
1239
|
GuiCommandQueue.getInstance().addCommand(guiCommand);
|
|
1240
1240
|
}
|
|
1241
|
-
static addValueWithLine(commandType, obj, line, value
|
|
1241
|
+
static addValueWithLine(commandType, obj, line, value) {
|
|
1242
1242
|
let guiCommand = new GuiCommand(obj, commandType);
|
|
1243
1243
|
guiCommand.value = value;
|
|
1244
1244
|
guiCommand.line = line;
|
|
1245
1245
|
if (commandType === CommandType.SET_VALUE) {
|
|
1246
|
-
if (reset)
|
|
1247
|
-
guiCommand.Bool1 = reset;
|
|
1248
1246
|
if (obj instanceof GuiMgControl && obj.isChoiceControl()) {
|
|
1249
1247
|
if (value < 0)
|
|
1250
1248
|
guiCommand.value = '';
|
|
@@ -10432,7 +10430,7 @@ class FieldValidator {
|
|
|
10432
10430
|
return valDet;
|
|
10433
10431
|
}
|
|
10434
10432
|
if (ctrl.DataType !== StorageAttribute.ALPHA && ctrl.DataType !== StorageAttribute.UNICODE && ctrl.DataType !== StorageAttribute.BLOB) {
|
|
10435
|
-
if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
|
|
10433
|
+
if ((typeof this._newvalue === 'string' && this._newvalue.trim().length === 0) || (ctrl.DataType == StorageAttribute.NUMERIC && this._newvalue == null) || (ctrl.DataType === StorageAttribute.DATE && (ctrl.isDateZero(this._newvalue) || this.isNullDisplayVal()))) {
|
|
10436
10434
|
let field = ctrl.getField();
|
|
10437
10435
|
let defaultValue = field.getDefaultValue();
|
|
10438
10436
|
let text = null;
|
|
@@ -12463,12 +12461,8 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
12463
12461
|
if (super.isButton()) {
|
|
12464
12462
|
mlsTranslatedValue = Events.Translate(this.Value);
|
|
12465
12463
|
}
|
|
12466
|
-
if (this.isTextControl() || this.isButton())
|
|
12467
|
-
|
|
12468
|
-
Commands.addValueWithLine(CommandType.SET_VALUE, this, displayLine, mlsTranslatedValue, true);
|
|
12469
|
-
else
|
|
12470
|
-
Commands.addValueWithLine(CommandType.SET_VALUE, this, displayLine, mlsTranslatedValue);
|
|
12471
|
-
}
|
|
12464
|
+
if (this.isTextControl() || this.isButton())
|
|
12465
|
+
Commands.addValueWithLine(CommandType.SET_VALUE, this, displayLine, mlsTranslatedValue);
|
|
12472
12466
|
else
|
|
12473
12467
|
Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, displayLine, HtmlProperties.Text, mlsTranslatedValue);
|
|
12474
12468
|
}
|