Quintiq file version 2.0
|
#parent: #root
|
Method ShowTimeZoneWarning (
|
internal[WebImage] imgWarning_i,
|
TimeZone calendarTimezone_i,
|
Boolean isFromEvent_i
|
) id:Method_LibCal_GlobalState_ShowTimeZoneWarning
|
{
|
#keys: '[146730.0.1175922411]'
|
Body:
|
[*
|
// Only show when running in timezone-mode.
|
visible := TimeZone::HasTimeZoneSupport() and
|
ApplicationScope.SupportsTimezone();
|
|
if( visible )
|
{
|
// Only show the warning when the timezone-offset of the calendar is different from the
|
// offset of the local timezone of the Client.
|
calendarOffset := calendarTimezone_i.RawOffset();
|
localTimezone := LibCal_GlobalState.GetLocalTimeZone();
|
localOffset := localTimezone.RawOffset();
|
|
visible := localOffset <> calendarOffset;
|
|
if( visible )
|
{
|
calendarOffsetAsString := "GMT" + ifexpr( calendarOffset >= Duration::Zero(), "+", "" ) + calendarTimezone_i.RawOffset().Format( "h2:m" );
|
localOffsetAsString := "GMT" + ifexpr( localOffset >= Duration::Zero(), "+", "" ) + localTimezone .RawOffset().Format( "h2:m" );
|
|
if( isFromEvent_i )
|
{
|
imgWarning_i.Tooltip( Translations::Timezone_WarningEvent( calendarTimezone_i.ID(), calendarOffsetAsString,
|
localTimezone.ID(), localOffsetAsString ) );
|
}
|
else
|
{
|
imgWarning_i.Tooltip( Translations::Timezone_WarningSettings( calendarTimezone_i.ID(), calendarOffsetAsString,
|
localTimezone.ID(), localOffsetAsString ) );
|
|
}
|
}
|
}
|
|
imgWarning_i.Visible( visible );
|
*]
|
}
|