Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
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
Quintiq file version 2.0
#parent: btnCalendarSettings
Response OnClick () id:Response_LibCal_pnlSettingsButton_btnCalendarSettings_OnClick
{
  #keys: '[131094.0.1990989458]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      // Update the settings of (a subset of) all calendars.
      calendarRegistry := LibCal_GlobalState.GetCalendarRegistry();
      
      if( not isnull( calendarRegistry ) )
      {
        calendars := calendarRegistry.GetCalendars( dhContext.Data() );
        
        if( calendars.Size() = 0 )
        {
          showModal := true;
          WebMessageBox::Error( Translations::MessageBox_NoCalendarsFound( dhContext.Data() ),
                                Translations::MessageBox_OK(), showModal );
        }
        else
        {
          dlg := construct( LibCal_dlgCalendarSettings );
          dlg.Open( calendars );
        }
      }
      else
      {
        WebMessageBox::Error( "CalendarRegistry = NULL" ); 
      }
    *]
    GroupServerCalls: false
  }
}