haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
40
41
42
43
44
Quintiq file version 2.0
#parent: ListScenario
Response OnDrawElement (
  Scenario element
) id:Response_ListScenario_OnDrawElement
{
  #keys: '[11766.1.296637665]'
  Body:
  [*
    // Draw a selected dataset image for scenario selected - Macro plan
    idx := 0;
    
    if( exists( DataHolderForScenarioComparison.Data(), Elements, e, true, e.MDSID() = element.DatasetMDSID() ) )
    {
      drawinfo.Image(idx, "TABLES");
    }
    
    
    idx := 1;
    //additional match SelectionScenario is to fix the refresh of check mark in thin client as the datasetmdsid doesn't work for thin client
    if ( not isnull( MacroPlan )
              and not isnull ( SelectionScenario.Data() )
              and element = DataHolderActiveScenario.Data() )
    {
      drawinfo.Image(idx, "check2" );
    }
    else if ( not element.IsLoaded() )
    {
      drawinfo.Image(idx, "DATA_DOWN");
    }
    else
    {
      drawinfo.Image(idx, "");
    }
    
    //draw the loading icon when loading in progress
    idx := 2;
    if( element.IsLoadingInProgress() )
    {
      drawinfo.Image( idx, "DATA_UP" );
    }
  *]
  DefinitionID: 'Responsedef_List_OnDrawElement'
}