[TASK] Replace sprite icon "actions-edit-undo" with the new IconFactory 47/42947/4
authorMichael Oehlhof <typo3@oehlhof.de>
Mon, 31 Aug 2015 19:38:57 +0000 (21:38 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 1 Sep 2015 16:30:00 +0000 (18:30 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-edit-undo with the new IconFactory.

Resolves: #68937
Releases: master
Change-Id: I3a3d57528def039e7df42356c992bb47f15b1153
Reviewed-on: http://review.typo3.org/42947
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/TypoScript/ExtendedTemplateService.php
typo3/sysext/lang/locallang_core.xlf
typo3/sysext/recycler/Resources/Private/Partials/RecordsTable/DeletedRecord.html

index 3937c2d..4fddacb 100644 (file)
@@ -23,6 +23,8 @@ use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Dbal\Database\DatabaseConnection;
 use TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher;
 use TYPO3\CMS\Lang\LanguageService;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 
 /**
  * TSParser extension class to TemplateService
@@ -1134,6 +1136,8 @@ class ExtendedTemplateService extends TemplateService {
                        if (!$this->doNotSortCategoriesBeforeMakingForm) {
                                asort($this->categories[$category]);
                        }
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        foreach ($this->categories[$category] as $name => $type) {
                                $params = $theConstants[$name];
                                if (is_array($params)) {
@@ -1294,12 +1298,11 @@ class ExtendedTemplateService extends TemplateService {
                                                        $userTyposcriptStyle = 'style="display:none;"';
                                                        $defaultTyposcriptStyle = '';
                                                }
-                                               $deleteIconHTML = IconUtility::getSpriteIcon('actions-edit-undo', array(
-                                                       'class' => 'typo3-tstemplate-ceditor-control undoIcon',
-                                                       'alt' => 'Revert to default Constant',
-                                                       'title' => 'Revert to default Constant',
-                                                       'rel' => $idName
-                                               ));
+                                               $deleteTitle = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.deleteTitle', TRUE);
+                                               $deleteIcon = $iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL);
+                                               $deleteIconHTML = '<span title="' . $deleteTitle . '" alt="' . $deleteTitle . '"'
+                                                       . ' class="typo3-tstemplate-ceditor-control undoIcon" rel="' . $idName . '">'
+                                                       . $deleteIcon . '</span>';
                                                $editIconHTML = IconUtility::getSpriteIcon('actions-document-open', array(
                                                        'class' => 'typo3-tstemplate-ceditor-control editIcon',
                                                        'alt' => 'Edit this Constant',
index 36aec20..96e4564 100644 (file)
@@ -1227,6 +1227,9 @@ Check also the following points:\n
                        <trans-unit id="error.backendUserGroupListTypeError.message">
                                <source>Editing of at least one plugin was enabled but editing the page content type "Insert Plugin" is still disallowed. Group members won't be able to edit plugins unless you activate editing for the content type.</source>
                        </trans-unit>
+                       <trans-unit id="labels.deleteTitle">
+                               <source>Revert to default Constant</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
index f808e03..a58fa0f 100644 (file)
@@ -1,3 +1,4 @@
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
 <tr data-uid="{record.uid}" data-table="{record.table}" data-recordtitle="{record.title}">
        <td nowrap="nowrap">{record.tableTitle}</td>
        <td nowrap="nowrap"><f:format.html>{record.icon}</f:format.html> {record.title}</td>
                        <a class="btn btn-default" data-action="expand" data-toggle="collapse" data-target="#{record.table}_{record.uid}">
                                <f:be.buttons.icon icon="apps-pagetree-collapse" title="{f:translate(key: 'LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:button.expand')}" />
                        </a>
-                       <a class="btn btn-default" data-action="undo">
-                               <f:be.buttons.icon icon="actions-edit-undo" title="{f:translate(key: 'LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:button.undo')}" />
+                       <a class="btn btn-default" data-action="undo" title="{f:translate(key: 'LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:button.undo')}">
+                               <core:icon identifier="actions-edit-undo" />
                        </a>
                        <f:if condition="{allowDelete}">
-                               <a class="btn btn-default" data-action="delete">
-                                       <f:be.buttons.icon icon="actions-edit-delete" title="{f:translate(key: 'LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:button.delete')}" />
+                               <a class="btn btn-default" data-action="delete" title="{f:translate(key: 'LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:button.delete')}">
+                                       <core:icon identifier="actions-edit-delete" />
                                </a>
                        </f:if>
                        <label class="btn btn-default btn-checkbox">