[TASK] Replace sprite icon "apps-filetree-folder-default" with the new IconFactory 04/43204/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 14:05:47 +0000 (16:05 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 11 Sep 2015 14:20:53 +0000 (16:20 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
apps-filetree-folder-default with the new IconFactory.

Resolves: #69679
Releases: master
Change-Id: I9ad7950d4db9d26fb3024a1be9ab6b1c99b05b89
Reviewed-on: http://review.typo3.org/43204
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index 61a6d26..30c089c 100644 (file)
@@ -40,6 +40,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                ),
 
                // Action icons
+               'apps-filetree-folder-default' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/filetree-folder-default.png',
+                       )
+               ),
                'apps-toolbar-menu-cache' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
index 04db804..449b236 100755 (executable)
@@ -2046,7 +2046,7 @@ class ElementBrowser {
                        . ', \'\', \'\',\'\',1);">';
                // Add the foder icon
                $folderIcon = $aTag;
-               $folderIcon .= IconUtility::getSpriteIcon('apps-filetree-folder-default');
+               $folderIcon .= $this->iconFactory->getIcon('apps-filetree-folder-default', Icon::SIZE_SMALL);
                $folderIcon .= htmlspecialchars(GeneralUtility::fixed_lgd_cs($baseFolder->getName(), $titleLength));
                $folderIcon .= '</a>';
                $content .= $folderIcon . '<br />';
@@ -2057,7 +2057,7 @@ class ElementBrowser {
                        $subFolderIdentifier = $subFolder->getCombinedIdentifier();
                        // Create folder icon:
                        $icon = '<span style="width: 16px; height: 16px; display: inline-block;"></span>';
-                       $icon .= IconUtility::getSpriteIcon('apps-filetree-folder-default', array('title' => htmlspecialchars($subFolder->getName())));
+                       $icon .= '<span title="' . htmlspecialchars($subFolder->getName()) . '">' . $this->iconFactory->getIcon('apps-filetree-folder-default', Icon::SIZE_SMALL) . '</span>';
                        // Create links for adding the folder:
                        if ($this->P['itemName'] != '' && $this->P['formName'] != '') {
                                $aTag = '<a href="#" onclick="return set_folderpath(' . GeneralUtility::quoteJSvalue($subFolderIdentifier)