N°4336 - Improve tooltip pertinence, by hiding useless entries

This commit is contained in:
denis.flaven@combodo.com
2021-09-28 18:17:09 +02:00
parent 30da7d2ea4
commit 78b1ee04e8

View File

@@ -88,6 +88,11 @@ class PopoverMenuItemFactory
'tooltip' => isset($aActionData['tooltip']) ? $aActionData['tooltip'] : '',
];
// Avoid meaningless tooltips which are identical to the label
if ($aRefactoredItem['tooltip'] == $aRefactoredItem['label']) {
$aRefactoredItem['tooltip'] = '';
}
if (!empty($aRefactoredItem['on_click'])) {
// JS
$oPopoverMenuItem = PopoverMenuItemFactory::MakeFromApplicationPopupMenuItem(