[TASK] Replace sprite icon "actions-edit-undo" with IconFactory 03/42503/3
authorMarkus Guenther <mail@markus-guenther.de>
Tue, 11 Aug 2015 09:15:12 +0000 (11:15 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 12 Aug 2015 17:59:18 +0000 (19:59 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-edit-undo with the new IconFactory.

Change-Id: I42ed3f6368fc27c47bdc0ce7e74380ba0fbd5b12
Resolves: #68845
Releases: master
Reviewed-on: http://review.typo3.org/42503
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php
typo3/sysext/backend/Classes/Form/Element/SelectSingleBoxElement.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 1435f8d..b926206 100644 (file)
@@ -1174,7 +1174,7 @@ class EditDocumentController {
                                                                )
                                                        )
                                                ) . '; return false;';
-                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
+                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) {
                                        $aOnClick = 'window.location.href=' .
index a99b098..74f4423 100755 (executable)
@@ -1235,7 +1235,7 @@ class PageLayoutController {
                                                                        )
                                                                )
                                                        ) . '; return false;') . '"
-                                               title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
+                                               title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
                                        // History button
                                        $buttons['history_record'] = '<a href="#"
                                                onclick="' . htmlspecialchars('jumpToUrl(' .
index d7c5b10..d143118 100644 (file)
@@ -275,7 +275,7 @@ class RteController extends AbstractWizardController implements \TYPO3\CMS\Core\
                                                        )
                                                )
                                        ) . '; return false;';
-                               $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
+                               $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
                        }
                        // Shortcut
                        if ($this->getBackendUserAuthentication()->mayMakeShortcut()) {
index a24dc3e..41c38e5 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
@@ -239,9 +240,11 @@ class SelectCheckBoxElement extends AbstractFormElement {
                                // Build reset group button
                                $resetGroupBtn = '';
                                if (!empty($resetGroup)) {
+                                       $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection', TRUE);
                                        $resetGroupBtn = '
-                                               <a href="#" class="btn btn-default" onclick="' . implode('', $resetGroup) . ' return false;' . '">
-                                                       ' . IconUtility::getSpriteIcon('actions-edit-undo', array('title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection')))) . '
+                                               <a href="#" class="btn btn-default" onclick="' . implode('', $resetGroup) . ' return false;'
+                                               . '" title="' . $title . '">
+                                                       ' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '
                                                        ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection') . '
                                                </a>
                                                ';
index 1f0cb89..8e4818f 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
@@ -157,8 +158,8 @@ class SelectSingleBoxElement extends AbstractFormElement {
                                                ' . $selectBox . '
                                        </div>
                                        <div class="form-wizards-items">
-                                               <a href="#" class="btn btn-default" onclick="' . $onClick . '" title="' . htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection')) . '">'
-                                                       . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>
+                                               <a href="#" class="btn btn-default" onclick="' . $onClick . '" title="' . $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection', TRUE) . '">'
+                                                       . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>
                                        </div>
                                </div>
                        </div>
index 3974675..193a88e 100644 (file)
@@ -164,6 +164,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'retweet',
                        )
                ),
+               'actions-edit-undo' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'undo',
+                       )
+               ),
 
                // OVERLAYS
                'overlay-read-only' => array(