[TASK] Add tooltips to the permission icons 66/47666/4
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 14 Apr 2016 13:34:47 +0000 (15:34 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 14 Apr 2016 15:35:44 +0000 (17:35 +0200)
To improve the usability, add tool tips to the icons.

Resolves: #75616
Releases: master, 7.6
Change-Id: Iceffc8d15625aa02da55ce533463951546d8d890
Reviewed-on: https://review.typo3.org/47666
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/beuser/Classes/Controller/PermissionController.php
typo3/sysext/beuser/Classes/ViewHelpers/PermissionsViewHelper.php

index 724dbfb..bcbbfde 100644 (file)
@@ -128,6 +128,7 @@ class PermissionController extends ActionController
         // the view of the update action has a different view class
         if ($view instanceof BackendTemplateView) {
             $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Beuser/Permissions');
+            $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/Tooltip');
             $view->getModuleTemplate()->addJavaScriptCode(
                 'jumpToUrl',
                 '
index 03d76f4..f7d5082 100644 (file)
@@ -75,8 +75,11 @@ class PermissionsViewHelper extends AbstractViewHelper
                 $permissionClass = 'fa-times text-danger';
                 $mode = 'add';
             }
+
+            $label = htmlspecialchars(static::$permissionLabels[$mask]);
             $icon .= '<span style="cursor:pointer"'
-                . ' title="' . htmlspecialchars(static::$permissionLabels[$mask]) . '"'
+                . ' title="' . $label . '"'
+                . ' data-toggle="tooltip"'
                 . ' data-page="' . $arguments['pageId'] . '"'
                 . ' data-permissions="' . $arguments['permission'] . '"'
                 . ' data-who="' . $arguments['scope'] . '"'