[BUGFIX] spriteManager for Clear RTE Cache icon
authorFelix Kopp <felix-source@phorax.com>
Sat, 31 Dec 2011 13:58:06 +0000 (14:58 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 28 Jan 2012 11:45:44 +0000 (12:45 +0100)
RTE hooks into the clear cache menu to allow clearing RTE cache.
Changes the icon integration from iconWorks to spriteManager.
Solves styling issue caused by too small icon.

Change-Id: I60a5bbd045f05075be81eaab6603c02ab2653952
Resolves: #32892
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/8744
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/rtehtmlarea/ext_tables.php
typo3/sysext/rtehtmlarea/hooks/clearrtecache/class.tx_rtehtmlarea_clearcachemenu.php

index 8321cb1..17a232a 100644 (file)
@@ -76,5 +76,10 @@ if (TYPO3_MODE === 'BE' && t3lib_extMgm::isLoaded('setup') && is_array($GLOBALS[
                )
        );
        $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xml:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
+
+       $icons = array(
+               'clearcachemenu' => t3lib_extMgm::extRelPath('rtehtmlarea') . 'hooks/clearrtecache/clearrtecache.png'
+       );
+       t3lib_SpriteManager::addSingleIcons($icons, 'rtehtmlarea');
 }
 ?>
\ No newline at end of file
index 2e5a279..c9dace9 100644 (file)
@@ -45,11 +45,10 @@ class tx_rtehtmlarea_clearcachemenu implements backend_cacheActionsHook {
                                // Add new cache menu item
                        $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/clearrtecache/locallang.xml:title');
                        $cacheActions[] = array(
-                               'id'    => 'clearRTECache',
+                               'id' => 'clearRTECache',
                                'title' => $title,
-                               'href'  => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=rtehtmlarea::clearTempDir',
-                               'icon'  => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'sysext/rtehtmlarea/hooks/clearrtecache/clearrtecache.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
-                               //'icon'  => '<img src="' . t3lib_extMgm::extRelPath('rtehtmlarea') . 'hooks/clearrtecache/clearrtecache.png" width="16" height="16" title="'.htmlspecialchars($title).'" alt="" />'
+                               'href' => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=rtehtmlarea::clearTempDir',
+                               'icon' => t3lib_iconWorks::getSpriteIcon('extensions-rtehtmlarea-clearcachemenu', array('title' => $title))
                        );
                        $optionValues[] = 'clearRTECache';
                }