N°5905 - Move tab description to a tooltip on the panel's title instead of a big blue alert

This commit is contained in:
Molkobain
2023-01-27 17:24:50 +01:00
parent 0374e303e4
commit af2421a2cb
6 changed files with 31 additions and 7 deletions

View File

@@ -157,6 +157,13 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
$oContainer->SetTitle($aExtraParams['panel_title']);
}
}
// - Description
if (isset($aExtraParams['panel_title_tooltip'])) {
$oContainerTitleBlock = $oContainer->GetTitleBlock()
->AddDataAttribute('tooltip-content', $aExtraParams['panel_title_tooltip'])
->AddDataAttribute('tooltip-max-width', 'min(600px, 90vw)') // Allow big description to be wide enough while shrinking on small screens
->AddCSSClass('ibo-has-description');
}
// Panel subtitle
if(!empty($oDataTable->GetInitDisplayData()) && isset($oDataTable->GetInitDisplayData()['recordsTotal'])){