[TASK] Replace sprite icon "actions-edit-replace" with IconFactory 02/42502/2
authorMarkus Guenther <mail@markus-guenther.de>
Tue, 11 Aug 2015 09:00:37 +0000 (11:00 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 11 Aug 2015 21:55:45 +0000 (23:55 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-edit-replace with the new IconFactory.

Change-Id: I72bf689355b31147d8cb22179928bb884c837a43
Resolves: #68934
Releases: master
Reviewed-on: http://review.typo3.org/42502
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
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/core/Classes/Imaging/IconRegistry.php
typo3/sysext/filelist/Classes/FileList.php

index bd3ad59..a3d3652 100644 (file)
@@ -146,6 +146,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'download',
                        )
                ),
+               'actions-edit-replace' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'retweet',
+                       )
+               ),
 
                // OVERLAYS
                'overlay-read-only' => array(
index 13b1384..424a50c 100644 (file)
@@ -911,7 +911,7 @@ class FileList extends AbstractRecordList {
                if ($fileOrFolderObject instanceof File && $fileOrFolderObject->checkActionPermission('replace')) {
                        $url = BackendUtility::getModuleUrl('file_replace', array('target' => $fullIdentifier, 'uid' => $fileOrFolderObject->getUid()));
                        $replaceOnClick = 'top.content.list_frame.location.href = ' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;';
-                       $cells['replace'] = '<a href="#" class="btn btn-default" onclick="' . $replaceOnClick . '"  title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.replace') . '">' . IconUtility::getSpriteIcon('actions-edit-replace') . '</a>';
+                       $cells['replace'] = '<a href="#" class="btn btn-default" onclick="' . $replaceOnClick . '"  title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.replace') . '">' . $this->iconFactory->getIcon('actions-edit-replace', Icon::SIZE_SMALL) . '</a>';
                }
 
                // rename the file