Quintiq file version 2.0
|
#parent: #root
|
Method DeleteEventsOrSubscriptions (
|
structured[LibCal_Participation] participations_i
|
) id:Method_LibCal_GlobalState_DeleteEventsOrSubscriptions_870
|
{
|
#keys: '[146730.0.131272267]'
|
Body:
|
[*
|
if( participations_i.Size() = 1 )
|
{
|
// Give more accurate feedback when there is only one participation selected.
|
this.DeleteEventOrSubscription( participations_i.Element( 0 ) );
|
}
|
else
|
{
|
subject := "the selected " + ifexpr( participations_i.Element( 0 ).IsSubscription(), "subscriptions", "events" );
|
title := "Delete " + ifexpr( participations_i.Element( 0 ).IsSubscription(), "Subscriptions", "Events" );
|
defButton := 0;
|
|
if( WebMessageBox::Question( Translations::MessageBox_ConfirmDeletion( subject ),
|
Translations::MessageBox_YesNo(),
|
defButton, title ) = 0 )
|
{
|
// When the selection consists of LeadingParticipations their accompanying Events will also be deleted.
|
LibCal_Participation::Delete( participations_i );
|
}
|
}
|
*]
|
}
|