N°6154 N°6219 - Relations Read - tooltip, confirmation title and message (#486)

N°6154 - n:n Read - tooltip, confirmation title and message on Add-Edit-Remove
N°6219 - 1:n Read: tooltip, modal title and message on Add-Edit-Remove-Delete
This commit is contained in:
bdalsass
2023-04-28 14:43:53 +02:00
committed by GitHub
parent 269c1bf005
commit de35d941c1
28 changed files with 461 additions and 254 deletions

View File

@@ -249,6 +249,15 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
$oButton->SetColor($aAction['color']);
}
$oButton->SetDataAttributes(['label' => Dict::S($aAction['label']), 'action-id' => $iKey, 'table-id' => $oTable->GetId()]);
if (array_key_exists('metadata', $aAction)) {
$aMetadata = $aAction['metadata'];
if (is_array($aMetadata)) {
foreach ($aMetadata as $key => $value) {
$oButton->AddDataAttribute($key, $value);
}
}
}
$oToolbar->AddSubBlock($oButton);
}
@@ -922,10 +931,14 @@ JS;
/**give definition of id for select checkbox*/
'row_actions',
/** array of blocks displayed on every row */
'creation_in_modal_is_allowed',
/** bool to allow a creation of a new object of this type in a modal */
'creation_in_modal',
/** bool to perform a creation of a new object of this type in a modal */
'creation_in_modal_tooltip',
/** creation in modal button tooltip */
'creation_in_modal_js_handler',
/** Handler to call when trying to create a new object in modal */
'creation_disallowed',
/** Don't provide the standard object creation feature */
];
}
}