[BUGFIX] Proper cursor icon in access module
authorGeorg Ringer <mail@ringerge.org>
Mon, 16 Jan 2012 18:32:52 +0000 (19:32 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 17 Jan 2012 07:26:22 +0000 (08:26 +0100)
The access module got those nice red/green icons but many
people don't know that those are clickable because the cursor
icon is wrong.

Change-Id: I8a050fdb32af875c0e8345427713cb68c0925d11
Fixes: #33230
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/7821
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/perm/mod1/class.sc_mod_web_perm_ajax.php

index cc06a25..0863669 100644 (file)
@@ -349,18 +349,33 @@ class SC_mod_web_perm_ajax {
         * @return      string          HTML marked up x/* indications.
         */
        public static function renderPermissions($int, $pageId = 0, $who = 'user') {
-               global $LANG;
                $str = '';
 
-               $permissions = array(1,16,2,4,8);
+               $permissions = array(1, 16, 2, 4, 8);
                foreach ($permissions as $permission) {
                        if ($int&$permission) {
-                               $str .= t3lib_iconWorks::getSpriteIcon('status-status-permission-granted',array('tag'=>'a','title'=>$LANG->getLL($permission,1), 'onclick'=> 'WebPermissions.setPermissions('.$pageId.', '.$permission.', \'delete\', \''.$who.'\', '.$int.');'));
+                               $str .= t3lib_iconWorks::getSpriteIcon(
+                                                       'status-status-permission-granted',
+                                                       array(
+                                                               'tag' => 'a',
+                                                               'title' => $GLOBALS['LANG']->getLL($permission, TRUE),
+                                                               'onclick'=> 'WebPermissions.setPermissions(' . $pageId . ', ' . $permission . ', \'delete\', \'' . $who . '\', ' . $int . ');',
+                                                               'style' => 'cursor:pointer'
+                                                       )
+                                               );
                        } else {
-                               $str .= t3lib_iconWorks::getSpriteIcon('status-status-permission-denied',array('tag'=>'a','title'=>$LANG->getLL($permission,1),'onclick'=>'WebPermissions.setPermissions('.$pageId.', '.$permission.', \'add\', \''.$who.'\', '.$int.');'));
+                               $str .= t3lib_iconWorks::getSpriteIcon(
+                                                       'status-status-permission-denied',
+                                                       array(
+                                                               'tag' => 'a',
+                                                               'title' => $GLOBALS['LANG']->getLL($permission, TRUE),
+                                                               'onclick' => 'WebPermissions.setPermissions(' . $pageId . ', ' . $permission . ', \'add\', \'' . $who . '\', ' . $int . ');',
+                                                               'style' => 'cursor:pointer'
+                                                       )
+                                               );
                        }
                }
-               return '<span id="'.$pageId.'_'.$who.'">'.$str.'</span>';
+               return '<span id="' . $pageId . '_' . $who . '">' . $str . '</span>';
        }
 
 }