hi,
I created two tabs in Accounts module. I used this documentation to make them dynamic. For example if account_type is "Analyst" show "New Panel 1" and if account_type is "Competitor" show "New Panel 2".
Till now everything is working fine. However, when I resize the the browser, an arrow appears next to the first tab in the above. When I click the arrow, it shows the tabs that I hidden them using the setPanelVisibility. If you have any idea, then please share it with me. bellow is the demo
This is my code:
sugarcrm\custom\Extension\modules\Accounts\Ext\Dependencies\setPanelVisibility.php
<?php
$dependencies['Accounts']['panel_p1_visibility'] = array(
'hooks' => array("edit","view"),
'trigger' => 'equal($account_type, "Analyst")',
'triggerFields' => array('account_type'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'LBL_RECORDVIEW_PANEL1',
'value' => 'true',
),
)
),
//notActions is a list of actions to fire when the trigger is false
'notActions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'LBL_RECORDVIEW_PANEL1',
'value' => 'false',
),
),
),
);
$dependencies['Accounts']['panel_p2_visibility'] = array(
'hooks' => array("edit","view"),
'trigger' => 'equal($account_type, "Competitor")',
'triggerFields' => array('account_type'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'LBL_RECORDVIEW_PANEL2',
'value' => 'true',
),
)
),
//notActions is a list of actions to fire when the trigger is false
'notActions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'LBL_RECORDVIEW_PANEL2',
'value' => 'false',
),
),
),
);
Thank you