Commit 98dcf168 authored by Marco Christian Krenn's avatar Marco Christian Krenn Committed by Benjamin Kott
Browse files

[TASK] Change duplicate icon identifiers to actions-close

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 Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
parent ea8c036c
......@@ -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);
......
......@@ -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:
......
......@@ -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()
......
......@@ -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>
......
......@@ -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">'
......
......@@ -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);
......
......@@ -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>
......
......@@ -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
......
.. 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
......@@ -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());
}
......
......@@ -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
......
......@@ -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'])
......
......@@ -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',
......
......@@ -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'])
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment