Skip to content

Commit

Permalink
[BUGFIX] Add missing tooltips in record and filelist
Browse files Browse the repository at this point in the history
The recently introduced buttons for the
secondary action items in the record and
filelist do now define a title, which is then
displayed as tooltip.

Also the translate file metadata control
does now display a tooltip.

Note: The tooltips are added to the container
elements, since the button elements already
define data-bs-toggle="dropdown" and bootstrap
only allows one instance per element.

Resolves: #97359
Releases: main, 11.5
Change-Id: Ib5ccc55c6c17b6d3e0c508c8e3b5819ce03944bb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74292
Tested-by: core-ci <typo3@b13.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
o-ba authored and maddy2101 committed Apr 12, 2022
1 parent b00e891 commit ede0f3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions typo3/sysext/filelist/Classes/FileList.php
Expand Up @@ -1137,7 +1137,8 @@ public function makeEdit($fileOrFolderObject)

if ($cellOutput !== '') {
$icon = $this->iconFactory->getIcon('actions-menu-alternative', Icon::SIZE_SMALL);
$output .= '<div class="btn-group dropdown position-static">' .
$title = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.more');
$output .= '<div class="btn-group dropdown position-static" data-bs-toggle="tooltip" title="' . htmlspecialchars($title) . '" >' .
'<a href="#actions_' . $fileOrFolderObject->getHashedIdentifier() . '" class="btn btn-default dropdown-toggle dropdown-toggle-no-chevron" data-bs-toggle="dropdown" data-bs-boundary="window" aria-expanded="false">' . $icon->render() . '</a>' .
'<ul id="actions_' . $fileOrFolderObject->getHashedIdentifier() . '" class="dropdown-menu dropdown-list">' . $cellOutput . '</ul>' .
'</div>';
Expand Down Expand Up @@ -1288,7 +1289,7 @@ protected function makeTranslations(File $file): string
}

return $translations !== [] ? '
<div class="btn-group dropdown position-static">
<div class="btn-group dropdown position-static" data-bs-toggle="tooltip" title="' . htmlspecialchars($this->getLanguageService()->getLL('translateMetadata')) . '">
<button class="btn btn-default dropdown-toggle dropdown-toggle-no-chevron" type="button" id="translations_' . $file->getHashedIdentifier() . '" data-bs-toggle="dropdown" data-bs-boundary="window" aria-expanded="false">
' . $this->iconFactory->getIcon('actions-translate', Icon::SIZE_SMALL)->render() . '
</button>
Expand Down
Expand Up @@ -1827,7 +1827,8 @@ public function makeControl($table, $row)

if ($cellOutput !== '') {
$icon = $this->iconFactory->getIcon('actions-menu-alternative', Icon::SIZE_SMALL);
$output .= ' <div class="btn-group dropdown position-static">' . // @todo add label / tooltip
$title = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.more');
$output .= ' <div class="btn-group dropdown position-static" data-bs-toggle="tooltip" title="' . htmlspecialchars($title) . '">' .
'<a href="#actions_' . $table . '_' . $row['uid'] . '" class="btn btn-default dropdown-toggle dropdown-toggle-no-chevron" data-bs-toggle="dropdown" data-bs-boundary="window" aria-expanded="false">' . $icon->render() . '</a>' .
'<ul id="actions_' . $table . '_' . $row['uid'] . '" class="dropdown-menu dropdown-list">' . $cellOutput . '</ul>' .
'</div>';
Expand Down

0 comments on commit ede0f3b

Please sign in to comment.