admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
Quintiq file version 2.0
#parent: CustomDrawComponentRoutingConfigurator
Response OnClick (
  structured[Operation] selection
) id:Response_CustomDrawComponentRoutingConfigurator_MenuEnableDisableOperation_OnClick
{
  #keys: '[113694.1.1939224249]'
  Body:
  [*
    // Toggle IsEnabled of operation
    //Prompt user for action if action will disable operation(s) and remove period task
    if( ApplicationLibMacroPlanner.GetPeriodTaskRemovalWarningDialog( selection,
                                                                   Operation::GetDisplayDefinitionName() ) )
    {
      Process_MP::ToggleIsEnabled( selection );
    }
  *]
  CanBindMultiple: false
  DefinitionID => /CustomDrawComponentRoutingConfigurator/Responsedef_CustomDrawComponentRoutingConfigurator_Menu_OnClick
  Initiator: 'MenuEnableDisableOperation'
  Precondition:
  [*
    if ( selection.Element( 0 ).IsEnabled() )
    {
      MenuEnableDisableOperation.SetProperty( 'Image', 'EMPTYCHECKBOX' );
      MenuEnableDisableOperation.Text( Translations::MP_Designer_Disable() );
    }
    else
    {
      MenuEnableDisableOperation.SetProperty( 'Image', 'CHECKEDCHECKBOX' );
      MenuEnableDisableOperation.Text( Translations::MP_Designer_Enable() );
    }
    return true;
  *]
}