[TASK] Change duplicate icon identifiers to actions-close 85/52285/6
authorMarco Christian Krenn <krenn@webconsulting.at>
Fri, 31 Mar 2017 10:15:56 +0000 (12:15 +0200)
committerBenjamin Kott <benjamin.kott@outlook.com>
Fri, 31 Mar 2017 12:57:58 +0000 (14:57 +0200)
The following icons which were previously used in the Install tool
were all replaced by "actions-close" which acts as a synonym.

* actions-document-close
* actions-message-error-close

Resolves: #80601
Releases: master
Change-Id: I95358aa6e34237f0fa27049aadf0ae788fef2172
Reviewed-on: https://review.typo3.org/52285
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
17 files changed:
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
typo3/sysext/backend/Resources/Private/Templates/Clipboard/Main.html
typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
typo3/sysext/beuser/Classes/Controller/PermissionController.php
typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
typo3/sysext/core/Tests/Unit/Imaging/IconTest.php
typo3/sysext/form/Classes/Controller/FormEditorController.php
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js
typo3/sysext/lang/Classes/Controller/LanguageController.php
typo3/sysext/rtehtmlarea/Classes/Controller/Wizard/RteController.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index 598989d..61fa9d8 100644 (file)
@@ -1271,7 +1271,7 @@ class EditDocumentController extends AbstractModule
             ->setClasses('t3js-editform-close')
             ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
             ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                'actions-document-close',
+                'actions-close',
                 Icon::SIZE_SMALL
             ));
         $buttonBar->addButton($closeButton);
index 1842e3f..53093d8 100644 (file)
@@ -274,7 +274,7 @@ class EditFileController extends AbstractModule
             ->setHref('#')
             ->setOnClick('backToList(); return false;')
             ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.cancel'))
-            ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+            ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
         $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
 
         // Make shortcut:
index 4d15127..9fe0d13 100644 (file)
@@ -184,7 +184,7 @@ class TableController extends AbstractWizardController
             $closeButton = $buttonBar->makeLinkButton()
                 ->setHref($this->P['returnUrl'])
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
             $buttonBar->addButton($closeButton);
             // Save
             $saveButton = $buttonBar->makeInputButton()
index 8dc5c73..62914f8 100644 (file)
@@ -18,7 +18,7 @@
                                                        <f:if condition="{elementCount}">
                                                                <a href="{removeAllUrl}#clip_head"
                                                                         title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:buttons.clear')}" class="btn btn-danger">
-                                                                       <f:format.raw><core:icon identifier="actions-document-close" alternativeMarkupIdentifier="inline"></core:icon></f:format.raw>
+                                                                       <f:format.raw><core:icon identifier="actions-close" alternativeMarkupIdentifier="inline"></core:icon></f:format.raw>
                                                                </a>
                                                        </f:if>
                                                </td>
index ebd4926..696513e 100644 (file)
@@ -197,7 +197,7 @@ class PermissionAjaxController
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_owner" id="new_page_owner">' . $options . '</select>';
         $saveButton = '<a class="saveowner btn btn-default" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
         return '<span id="' . $elementId . '">'
             . $selector
             . '<span class="btn-group">'
@@ -246,7 +246,7 @@ class PermissionAjaxController
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_group" id="new_page_group">' . $options . '</select>';
         $saveButton = '<a class="savegroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
         return '<span id="' . $elementId . '">'
             . $selector
             . '<span class="btn-group">'
index fae4de3..8b2b66b 100644 (file)
@@ -171,7 +171,7 @@ class PermissionController extends ActionController
                 ->setHref($closeUrl)
                 ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
                 ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon(
-                    'actions-document-close',
+                    'actions-close',
                     Icon::SIZE_SMALL
                 ));
             $buttonBar->addButton($closeButton);
index e4aff96..e97229e 100644 (file)
@@ -35,7 +35,7 @@
                                                        arguments="{backendUser: onlineUser.backendUser, sessionId: session.id}"
                                                        data="{severity: 'warning', title: '{f:translate(key: \'endSession\')}', content: '{f:translate(key: \'reallyLogout\')} {onlineUser.backendUser.userName}?', button-close-text: '{f:translate(key: \'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel\')}'}"
                                                >
-                                                       <core:icon identifier="actions-document-close" />
+                                                       <core:icon identifier="actions-close" />
                                                        <f:translate key="endSession" />
                                                </f:link.action>
                                        </f:else>
index 42ba7e4..ef5292d 100644 (file)
@@ -2926,7 +2926,12 @@ class IconRegistry implements SingletonInterface
      *
      * @var array
      */
-    protected $deprecatedIcons = [];
+    protected $deprecatedIcons = [
+        'actions-document-close' => [
+            'message' => '%s is deprecated since TYPO3 CMS 8, this icon will be removed in TYPO3 CMS 9',
+            'replacement' => 'actions-close'
+        ]
+    ];
 
     /**
      * @var string
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst
new file mode 100644 (file)
index 0000000..ef58f65
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+========================================================================
+Deprecation: #80601 - Change duplicate icon identifiers to actions-close
+========================================================================
+
+See :issue:`80601`
+
+Description
+===========
+
+The icon :code:`actions-document-close` has been marked as deprecated.
+
+
+Impact
+======
+
+Using the icon identifier :code:`actions-document-close` will trigger a deprecation log entry.
+
+Affected Installations
+======================
+
+Any installation using the icon identifier.
+
+
+Migration
+=========
+
+Use the new icon identifier :code:`actions-close` instead.
+
+
+.. index:: Backend
index ad9c041..f1d427c 100644 (file)
@@ -38,7 +38,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     /**
      * @var string
      */
-    protected $registeredIconIdentifier = 'actions-document-close';
+    protected $registeredIconIdentifier = 'actions-close';
 
     /**
      * @var string
@@ -128,7 +128,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed()
     {
-        $this->assertContains('<span class="t3js-icon icon icon-size-default icon-state-default icon-actions-document-close" data-identifier="actions-document-close">',
+        $this->assertContains('<span class="t3js-icon icon icon-size-default icon-state-default icon-actions-close" data-identifier="actions-close">',
             $this->subject->getIcon($this->registeredIconIdentifier)->render());
     }
 
@@ -138,7 +138,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed($size)
     {
-        $this->assertContains('<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-actions-document-close" data-identifier="actions-document-close">',
+        $this->assertContains('<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-actions-close" data-identifier="actions-close">',
             $this->subject->getIcon($this->registeredIconIdentifier, $size['input'])->render());
     }
 
index 1cc7168..e7fee44 100644 (file)
@@ -31,7 +31,7 @@ class IconTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     /**
      * @var string
      */
-    protected $iconIdentifier = 'actions-document-close';
+    protected $iconIdentifier = 'actions-close';
 
     /**
      * @var string
index 3a15aa8..3820a59 100644 (file)
@@ -304,7 +304,7 @@ class FormEditorController extends AbstractBackendController
                 ->setHref(BackendUtility::getModuleUrl('web_FormFormbuilder'))
                 ->setClasses('t3-form-element-close-form-button hidden')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
 
             $saveButton = $buttonBar->makeInputButton()
                 ->setDataAttributes(['identifier' => 'saveButton'])
index 30a3176..e7fb281 100644 (file)
@@ -66,7 +66,7 @@ define(['jquery',
                 formElementSelectorControlsWrapper: 'inspectorEditorFormElementSelectorControlsWrapper',
                 formElementSelectorSplitButtonContainer: 'inspectorEditorFormElementSelectorSplitButtonContainer',
                 formElementSelectorSplitButtonListContainer: 'inspectorEditorFormElementSelectorSplitButtonListContainer',
-                iconNotAvailable: 'actions-message-error-close',
+                iconNotAvailable: 'actions-close',
                 iconPage: 'apps-pagetree-page-default',
                 iconTtContent: 'mimetypes-x-content-text',
                 inspector: 'inspector',
index 7e4353a..aa26f5f 100644 (file)
@@ -336,7 +336,7 @@ class LanguageController extends ActionController
         $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar()->addButton($downloadAllButton, ButtonBar::BUTTON_POSITION_LEFT);
 
         $cancelButton = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar()->makeLinkButton()
-            ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL))
+            ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL))
             ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang.xlf:button.cancel'))
             ->setClasses('menuItem cancelItem disabled t3js-button-cancel')
             ->setDataAttributes(['action' => 'cancelLanguageUpdate'])
index 39c6d07..13e7fa5 100644 (file)
@@ -270,7 +270,7 @@ class RteController extends AbstractWizardController
             $closeButton = $buttonBar->makeLinkButton()
                 ->setHref($closeUrl)
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
             $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
 
             // Save
index 6e7d68d..2195061 100644 (file)
@@ -1014,7 +1014,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                     . ' data-button-close-text="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')) . '"'
                     . ' data-content="' . htmlspecialchars($this->getLanguageService()->getLL('msg.stop')) . '"'
                     . ' title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:stop')) . '" class="icon">' .
-                    $this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+                    $this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
                 $runAction = '<a class="btn btn-default" data-toggle="tooltip" data-container="body" href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('action.run_task')) . '" class="icon">' .
                     $this->moduleTemplate->getIconFactory()->getIcon('extensions-scheduler-run-task', Icon::SIZE_SMALL)->render() . '</a>';
                 $runCronAction = '<a class="btn btn-default" data-toggle="tooltip" data-container="body" href="' . htmlspecialchars($this->moduleUri . '&CMD=setNextExecutionTime&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task_cron', true) . '" class="icon">' .
@@ -1534,7 +1534,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
             // Close
             $closeButton = $buttonBar->makeLinkButton()
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL))
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL))
                 ->setOnClick('document.location=' . GeneralUtility::quoteJSvalue($this->moduleUri))
                 ->setHref('#');
             $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
index af68eaa..411cfee 100644 (file)
@@ -358,7 +358,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
                         ->setHref(BackendUtility::getModuleUrl('web_ts', ['id' => $this->id]))
                         ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
                         ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                            'actions-document-close',
+                            'actions-close',
                             Icon::SIZE_SMALL
                         ));
                     $buttonBar->addButton($closeButton);