Rename "refresh action" param of datatables to match conventions

This commit is contained in:
Molkobain
2021-12-10 14:55:51 +01:00
parent b91dee6c0c
commit 0ed2388cf8
2 changed files with 3 additions and 3 deletions

View File

@@ -174,7 +174,7 @@ class DisplayBlock
/** string Max. height of the list, if not specified will occupy all the available height no matter the pagination */
'localize_values',
/** param for export.php */
'sRefreshAction',
'refresh_action',
/**to add refresh button in datatable*/
], DataTableUIBlockFactory::GetAllowedParams()),
'list_search' => array_merge([
@@ -1886,7 +1886,7 @@ class MenuBlock extends DisplayBlock
$sClass = $this->m_oFilter->GetClass();
$oSet = new CMDBObjectSet($this->m_oFilter);
$sRefreshAction = $aExtraParams['sRefreshAction'] ?? '';
$sRefreshAction = $aExtraParams['refresh_action'] ?? '';
/** @var array $aRegularActions Any action other than a transition */
$aRegularActions = [];

View File

@@ -119,7 +119,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
{
if (!isset($aExtraParams['menu']) || $aExtraParams['menu']) {
$oMenuBlock = new MenuBlock($oSet->GetFilter(), $sStyle);
$aExtraParams['sRefreshAction'] = $oDataTable->GetJSRefresh();
$aExtraParams['refresh_action'] = $oDataTable->GetJSRefresh();
$oBlockMenu = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $sListId);
} else {
$bToolkitMenu = true;