@magic-xpa/engine 4.1100.0-dev4110.207 → 4.1100.0-dev4110.213

Sign up to get free protection for your applications and to get access to all the features.
@@ -20431,6 +20431,48 @@ class MgForm extends MgFormBase {
20431
20431
  getDvRowIdx(guiRowIdx) {
20432
20432
  return guiRowIdx - this.GetDataview().RecordsBeforeCurrentView;
20433
20433
  }
20434
+ async moveToFirstParkabelControl(callByDestSubForm) {
20435
+ let task = this.getTask();
20436
+ let parkableCtrl = null;
20437
+ parkableCtrl = await this.getValidParkableControl();
20438
+ ClientManager.handlingFirstParkableControl = true;
20439
+ if (!isNullOrUndefined(parkableCtrl))
20440
+ await parkableCtrl.invoke();
20441
+ else if (!callByDestSubForm)
20442
+ await AccessHelper.eventsManager.HandleNonParkableControls(task);
20443
+ ClientManager.handlingFirstParkableControl = false;
20444
+ }
20445
+ async getValidParkableControl() {
20446
+ let ctrlName = await this.getFirstParkableControlName();
20447
+ let ctrl = await this.GetCtrl(ctrlName);
20448
+ if (!isNullOrUndefined(ctrl)) {
20449
+ switch (ctrl.Type) {
20450
+ case MgControlType.CTRL_TYPE_BUTTON:
20451
+ case MgControlType.CTRL_TYPE_CHECKBOX:
20452
+ case MgControlType.CTRL_TYPE_RADIO:
20453
+ case MgControlType.CTRL_TYPE_COMBO:
20454
+ case MgControlType.CTRL_TYPE_LIST:
20455
+ case MgControlType.CTRL_TYPE_TEXT:
20456
+ if (!ctrl.isParkable(true))
20457
+ ctrl = null;
20458
+ break;
20459
+ default:
20460
+ ctrl = null;
20461
+ break;
20462
+ }
20463
+ }
20464
+ return ctrl;
20465
+ }
20466
+ async getFirstParkableControlName() {
20467
+ let ctrlName = '';
20468
+ if (this.checkIfExistProp(PropInterface.PROP_TYPE_PARK_FIRST_ON)) {
20469
+ if (this.getProp(PropInterface.PROP_TYPE_PARK_FIRST_ON).isExpression())
20470
+ ctrlName = await this.getProp(PropInterface.PROP_TYPE_PARK_FIRST_ON).getValue();
20471
+ else
20472
+ ctrlName = this.getProp(PropInterface.PROP_TYPE_PARK_FIRST_ON).getOrgValue();
20473
+ }
20474
+ return ctrlName;
20475
+ }
20434
20476
  }
20435
20477
 
20436
20478
  class RemoteTaskService extends TaskServiceBase {
@@ -24943,8 +24985,9 @@ class Task extends TaskBase {
24943
24985
  let mgForm = task.getForm();
24944
24986
  if (task.isCurrentStartProgLevel() && mgForm !== null && mgForm.MovedToFirstControl) {
24945
24987
  mgForm.MovedToFirstControl = false;
24946
- if (!callByDestSubForm)
24947
- await AccessHelper.eventsManager.HandleNonParkableControls(task);
24988
+ AccessHelper.eventsManager.pushNewExecStacks();
24989
+ await mgForm.moveToFirstParkabelControl(callByDestSubForm);
24990
+ AccessHelper.eventsManager.popNewExecStacks();
24948
24991
  }
24949
24992
  }
24950
24993
  }
@@ -29589,12 +29632,13 @@ class CommandsTable {
29589
29632
  }
29590
29633
  }
29591
29634
 
29592
- let CurrentClientVersion = '4.1100.0-dev4110.207';
29635
+ let CurrentClientVersion = '4.1100.0-dev4110.213';
29593
29636
 
29594
29637
  class ClientManager {
29595
29638
  static _instance = null;
29596
29639
  _globalUniqueSessionId = null;
29597
29640
  _buttonIsClicked = false;
29641
+ static handlingFirstParkableControl = false;
29598
29642
  static _executionPropertiesFileName = null;
29599
29643
  static assetsURL = "./assets";
29600
29644
  static get Instance() {
@@ -29622,7 +29666,7 @@ class ClientManager {
29622
29666
  }
29623
29667
  break;
29624
29668
  case "mousedown":
29625
- if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
29669
+ if (control.isButton() || control.isCheckBox() || (control.ConnectedControl && guiEvent.fromButton)) {
29626
29670
  this._buttonIsClicked = true;
29627
29671
  }
29628
29672
  else if (!control.isSubform())
@@ -29643,7 +29687,8 @@ class ClientManager {
29643
29687
  case "focus":
29644
29688
  if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
29645
29689
  return;
29646
- Events.OnFocus(control, lineIdx, true, false);
29690
+ if (!ClientManager.handlingFirstParkableControl)
29691
+ Events.OnFocus(control, lineIdx, true, false);
29647
29692
  break;
29648
29693
  case "dblclick":
29649
29694
  Events.OnDblClick(control, lineIdx);
@@ -29829,8 +29874,6 @@ class ClientManager {
29829
29874
  val = new ExpVal(StorageAttribute.ALPHA, false, value);
29830
29875
  GlobalParams.Instance.setValue(key, new MirrorExpVal(val), true);
29831
29876
  });
29832
- ClientManager.StartExecution(httpClient);
29833
- Logger.Instance.Flush();
29834
29877
  }
29835
29878
  static async StopExecution() {
29836
29879
  try {