limj
2023-10-24 93652435728de839582440eefd5122c281181d35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Quintiq file version 2.0
#parent: lblConfirmation
Response OnTextChanged () id:Response_LibCal_dlgCalendarSettings_lblConfirmation_OnTextChanged
{
  #keys: '[146730.0.1423942076]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebLabel_OnTextChanged'
  QuillAction
  {
    Body:
    [*
      // Trigger the update of the calendar settings based on the value that has been set
      // by dlgCalendarSettingsConfirmation.
      if( this.Text() <> "cancel" )
      {
        calendarsToUpdate := dhCalendars.Data();
        
        if( this.Text() = "same" )
        {
          // Only update calendars with the same settings, so remove the divergent calendars.
          divergentCalendars := Form.GetDivergentCalendars( dhCalendar.Data(), dhCalendars.Data() );
          calendarsToUpdate  := calendarsToUpdate.Difference( divergentCalendars );
        }
      
        Form.UpdateCalendars( calendarsToUpdate );
      
        // Close the dialog when the OK-button was clicked.  
        if( lblAction.Text() = "OK" )
        {
          Form.Close();
        }
      }
      
      // Reset the value otherwise the dialog is not closed when OK is clicked after Apply.
      this.Text( "" );
    *]
    GroupServerCalls: false
  }
}