From d40ba21e0061ec0199d716d7425b8b2216c8344e Mon Sep 17 00:00:00 2001 From: Markus Guenther <mail@markus-guenther.de> Date: Fri, 7 Aug 2015 15:35:04 +0200 Subject: [PATCH] [TASK] Replace sprite icon "actions-document-close" with the new IconFactory Replaces all IconUtility::getSpriteIcon calls for the icon actions-document-close with the new IconFactory. Change-Id: I097d1b83bd7b76ec14c9050fb5bc74411729809e Resolves: #68839 Releases: master Reviewed-on: http://review.typo3.org/42383 Reviewed-by: Jan Helke <typo3@helke.de> Tested-by: Jan Helke <typo3@helke.de> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> --- .../sysext/backend/Classes/Clipboard/Clipboard.php | 2 +- .../Controller/BackendLayoutWizardController.php | 6 +++++- .../Classes/Controller/EditDocumentController.php | 2 +- .../Classes/Controller/File/EditFileController.php | 10 +++++++++- .../Classes/Controller/PageLayoutController.php | 2 +- .../Classes/Controller/Wizard/RteController.php | 10 +++++++++- .../Classes/Controller/Wizard/TableController.php | 11 ++++++++++- .../Classes/Controller/PermissionAjaxController.php | 12 ++++++++++-- .../Private/Partials/BackendUser/OnlineListRow.html | 2 +- typo3/sysext/core/Classes/Imaging/IconRegistry.php | 2 +- .../sysext/form/Classes/View/Wizard/WizardView.php | 13 ++++++++++--- .../Backend/ToolbarItems/OpendocsToolbarItem.php | 10 +++++++++- .../Controller/SchedulerModuleController.php | 4 ++-- .../TypoScriptTemplateModuleController.php | 2 +- 14 files changed, 70 insertions(+), 18 deletions(-) diff --git a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php index a6daba7fea16..b1c7f4d5856a 100644 --- a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php +++ b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php @@ -279,7 +279,7 @@ class Clipboard { $menuSelector = ''; if ($elementCount) { // Delete: - $deleteLink = '<a class="btn btn-danger" href="' . htmlspecialchars($removeAllUrl) . '#clip_head">' . IconUtility::getSpriteIcon('actions-document-close', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE))) . '</a>'; + $deleteLink = '<a class="btn btn-danger" href="' . htmlspecialchars($removeAllUrl) . '#clip_head" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; if ($this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)) { $js = ' if (confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:mess.deleteClip'), $elementCount)) . ')){ diff --git a/typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php b/typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php index 364f8001ef9c..29f5a7716aba 100644 --- a/typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php +++ b/typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php @@ -17,6 +17,8 @@ namespace TYPO3\CMS\Backend\Controller; use TYPO3\CMS\Backend\Template\DocumentTemplate; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -200,11 +202,13 @@ class BackendLayoutWizardController { * @return void */ public function main() { + /** @var IconFactory $iconFactory */ + $iconFactory = GeneralUtility::makeInstance(IconFactory::class); $lang = $this->getLanguageService(); $resourcePath = ExtensionManagementUtility::extRelPath('backend') . 'Resources/Public/Images/BackendLayoutWizard/'; $content = '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . IconUtility::getSpriteIcon('actions-document-save') . '</a>'; $content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-save-close') . '</a>'; - $content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . $iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $content .= $this->doc->spacer(10); $content .= ' <table border="0" width="90%" height="90%" id="outer_container"> diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php index 137cf9289554..867106f9eb8c 100644 --- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php +++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php @@ -1151,7 +1151,7 @@ class EditDocumentController { } } // CLOSE button: - $buttons['close'] = '<a href="#" class="t3js-editform-close" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $buttons['close'] = '<a href="#" class="t3js-editform-close" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; // DELETE + UNDO buttons: if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData) === 1) { if ($this->firstEl['cmd'] != 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) { diff --git a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php index 3ee422006c84..c25701b12139 100644 --- a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php +++ b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php @@ -16,6 +16,8 @@ namespace TYPO3\CMS\Backend\Controller\File; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -70,10 +72,16 @@ class EditFileController { */ protected $fileObject; + /** + * @var IconFactory + */ + protected $iconFactory; + /** * Constructor */ public function __construct() { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $GLOBALS['SOBE'] = $this; $this->init(); } @@ -226,7 +234,7 @@ class EditFileController { $theIcon = IconUtility::getSpriteIcon('actions-document-save-close'); $buttons['SAVE_CLOSE'] = '<a href="#" onclick="document.editform.redirect.value=' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->returnUrl)) . '; document.editform.submit();" title="' . $lang->makeEntities($lang->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.saveAndClose', TRUE)) . '">' . $theIcon . '</a>'; // Cancel button - $theIcon = IconUtility::getSpriteIcon('actions-document-close'); + $theIcon = $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL); $buttons['CANCEL'] = '<a href="#" onclick="backToList(); return false;" title="' . $lang->makeEntities($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE)) . '">' . $theIcon . '</a>'; return $buttons; } diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index 0318ef39b696..c2b6e0261d34 100755 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -1214,7 +1214,7 @@ class PageLayoutController { // Save record and show page $buttons['savedokshow'] = '<a href="#" onclick="' . htmlspecialchars('document.editform.redirect.value+=\'&popView=1\'; TBE_EDITOR.checkAndDoSubmit(1); return false;') . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save-view') . '</a>'; // Close record - $buttons['closedok'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(' . GeneralUtility::quoteJSvalue($this->closeUrl) . '); return false;') . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $buttons['closedok'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(' . GeneralUtility::quoteJSvalue($this->closeUrl) . '); return false;') . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; // Delete record if ($this->deleteButton) { $buttons['deletedok'] = '<a href="#" onclick="' . htmlspecialchars('return deleteRecord(' . GeneralUtility::quoteJSvalue($this->eRParts[0]) . ',' . GeneralUtility::quoteJSvalue($this->eRParts[1]) . ',' . GeneralUtility::quoteJSvalue(GeneralUtility::getIndpEnv('SCRIPT_NAME') . '?id=' . $this->id) . ');') . '" title="' . $lang->getLL('deleteItem', TRUE) . '">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>'; diff --git a/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php b/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php index 0256d44f0983..0f3ad64a65cc 100644 --- a/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php +++ b/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php @@ -20,6 +20,8 @@ use TYPO3\CMS\Backend\Form\Utility\FormEngineUtility; use TYPO3\CMS\Backend\Template\DocumentTemplate; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -69,10 +71,16 @@ class RteController extends AbstractWizardController { */ public $MCONF = array(); + /** + * @var IconFactory + */ + protected $iconFactory; + /** * Constructor */ public function __construct() { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $this->getLanguageService()->includeLLFile('EXT:lang/locallang_wizards.xlf'); $GLOBALS['SOBE'] = $this; @@ -221,7 +229,7 @@ class RteController extends AbstractWizardController { $undoButton = 1; } // Close - $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(' . GeneralUtility::quoteJSvalue($closeUrl) . '); return false;') . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(' . GeneralUtility::quoteJSvalue($closeUrl) . '); return false;') . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; // Save $buttons['save'] = '<button class="c-inputButton" name="_savedok_x" onclick="TBE_EDITOR.checkAndDoSubmit(1); return false;">' . IconUtility::getSpriteIcon('actions-document-save', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE))) diff --git a/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php b/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php index e1f8b99816b8..49f6acafb81e 100644 --- a/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php +++ b/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php @@ -19,6 +19,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools; use TYPO3\CMS\Core\DataHandling\DataHandler; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\HttpUtility; use TYPO3\CMS\Core\Utility\MathUtility; @@ -103,10 +105,16 @@ class TableController extends AbstractWizardController { */ public $tableParsing_delimiter; + /** + * @var IconFactory + */ + protected $iconFactory; + /** * Constructor */ public function __construct() { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $this->getLanguageService()->includeLLFile('EXT:lang/locallang_wizards.xlf'); $GLOBALS['SOBE'] = $this; @@ -188,7 +196,8 @@ class TableController extends AbstractWizardController { // CSH Buttons $buttons['csh_buttons'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_table_wiz_buttons'); // Close - $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(' . GeneralUtility::quoteJSvalue(GeneralUtility::sanitizeLocalUrl($this->P['returnUrl'])) . '); return false;')) . '">' . IconUtility::getSpriteIcon('actions-document-close', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE))) . '</a>'; + $title = 'title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '"'; + $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(' . GeneralUtility::quoteJSvalue(GeneralUtility::sanitizeLocalUrl($this->P['returnUrl'])) . '); return false;')) . '" ' . $title . '>' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; // Save $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array('html' => '<button class="c-inputButton" name="savedok" value="1"></button>', 'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE))); // Save & Close diff --git a/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php b/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php index 83b64d3eeb9c..4c35b294ab82 100644 --- a/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php +++ b/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php @@ -18,6 +18,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Core\DataHandling\DataHandler; use TYPO3\CMS\Core\Http\AjaxRequestHandler; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Fluid\View\StandaloneView; @@ -36,10 +38,16 @@ class PermissionAjaxController { */ protected $conf = array(); + /** + * @var IconFactory + */ + protected $iconFactory; + /** * The constructor of this class */ public function __construct() { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $this->getLanguageService()->includeLLFile('EXT:lang/locallang_mod_web_perm.xlf'); // Configuration, variable assignment $this->conf['page'] = GeneralUtility::_POST('page'); @@ -182,7 +190,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" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . IconUtility::getSpriteIcon('actions-document-save') . '</a>'; - $cancelButton = '<a class="restoreowner" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $cancelButton = '<a class="restoreowner" 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) . '</a>'; return '<span id="' . $elementId . '">' . $selector . $saveButton . $cancelButton . '</span>'; } @@ -224,7 +232,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" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . IconUtility::getSpriteIcon('actions-document-save') . '</a>'; - $cancelButton = '<a class="restoregroup" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $cancelButton = '<a class="restoregroup" 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) . '</a>'; return '<span id="' . $elementId . '">' . $selector . $saveButton . $cancelButton . '</span>'; } diff --git a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html index 0ad983f7bb25..ac770a74bef3 100644 --- a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html +++ b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html @@ -37,7 +37,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/locallang_common.xlf:cancel\')}'}" > - <be:spriteManagerIcon iconName="actions-document-close" /> + <core:icon identifier="actions-document-close" size="small"/> <f:translate key="endSession" /> </f:link.action> </f:else> diff --git a/typo3/sysext/core/Classes/Imaging/IconRegistry.php b/typo3/sysext/core/Classes/Imaging/IconRegistry.php index a8d462ac91b7..85852ad62a00 100644 --- a/typo3/sysext/core/Classes/Imaging/IconRegistry.php +++ b/typo3/sysext/core/Classes/Imaging/IconRegistry.php @@ -41,7 +41,7 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface { 'actions-document-close' => array( 'provider' => FontawesomeIconProvider::class, 'options' => array( - 'name' => 'times', + 'name' => 'close', ) ), 'actions-document-edit-access' => array( diff --git a/typo3/sysext/form/Classes/View/Wizard/WizardView.php b/typo3/sysext/form/Classes/View/Wizard/WizardView.php index def9fabdc23c..e55bf18d5b07 100644 --- a/typo3/sysext/form/Classes/View/Wizard/WizardView.php +++ b/typo3/sysext/form/Classes/View/Wizard/WizardView.php @@ -15,6 +15,8 @@ namespace TYPO3\CMS\Form\View\Wizard; */ use TYPO3\CMS\Backend\Utility\BackendUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; @@ -309,6 +311,9 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { * @return array all available buttons as an assoc. array */ protected function getButtons() { + /** @var IconFactory $iconFactory */ + $iconFactory = GeneralUtility::makeInstance(IconFactory::class); + $buttons = array( 'csh' => '', 'csh_buttons' => '', @@ -323,9 +328,11 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView { $buttons['csh_buttons'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_buttons'); // Close $getPostVariables = GeneralUtility::_GP('P'); - $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(unescape(\'' . rawurlencode(GeneralUtility::sanitizeLocalUrl($getPostVariables['returnUrl'])) . '\')); return false;')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array( - 'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) - )) . '</a>'; + $title = 'title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '"'; + $onClick = htmlspecialchars('jumpToUrl(unescape(\'' . + rawurlencode(GeneralUtility::sanitizeLocalUrl($getPostVariables['returnUrl'])) . '\')); return false;'); + $buttons['close'] = '<a href="#" onclick="' . $onClick . '" ' . $title . '>' . + $iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; return $buttons; } diff --git a/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php b/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php index a20a19d195b5..e51889098397 100644 --- a/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php +++ b/typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php @@ -16,6 +16,8 @@ namespace TYPO3\CMS\Opendocs\Backend\ToolbarItems; use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -34,10 +36,16 @@ class OpendocsToolbarItem implements ToolbarItemInterface { */ protected $recentDocs; + /** + * @var IconFactory + */ + protected $iconFactory; + /** * Constructor */ public function __construct() { + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $this->getLanguageService()->includeLLFile('EXT:opendocs/Resources/Private/Language/locallang.xlf'); $this->loadDocsFromUserSession(); $pageRenderer = $this->getPageRenderer(); @@ -145,7 +153,7 @@ class OpendocsToolbarItem implements ToolbarItemInterface { if (!$isRecentDoc) { $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE); // Open document - $closeIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close'); + $closeIcon = $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL); $entry = ' <li class="opendoc"> <a href="#" class="dropdown-list-link dropdown-link-list-add-close" onclick="' . htmlspecialchars($onClickCode) . '" target="content">' . $icon . ' ' . $label . '</a> diff --git a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php index 97b43ec106bd..944fe846dbe0 100644 --- a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php +++ b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php @@ -978,7 +978,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas . ' data-button-close-text="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:cancel', TRUE) . '"' . ' data-content="' . $this->getLanguageService()->getLL('msg.stop', TRUE) . '"' . ' title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:stop', TRUE) . '" class="icon">' . - IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $runAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('extensions-scheduler-run-task') . '</a>'; @@ -1528,7 +1528,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } } if ($this->CMD === 'add' || $this->CMD === 'edit') { - $buttons['close'] = '<a href="#" onclick="document.location=' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->moduleUri)) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:cancel', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $buttons['close'] = '<a href="#" onclick="document.location=' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->moduleUri)) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:cancel', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $buttons['save'] = '<button name="CMD" value="save" class="c-inputButton" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:save', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save') . '</button>'; $buttons['saveclose'] = '<button name="CMD" value="saveclose" class="c-inputButton" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save-close') . '</button>'; $buttons['savenew'] = '<button name="CMD" value="savenew" class="c-inputButton" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndCreateNewDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save-new') . '</button>'; diff --git a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php index 036e146f1a89..1bff534d44ea 100755 --- a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php +++ b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php @@ -302,7 +302,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass { . '</button>'; // CLOSE button $url = BackendUtility::getModuleUrl('web_ts', array('id' => $this->id)); - $buttons['close'] = '<a href="' . htmlspecialchars($url) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') .'</a>'; + $buttons['close'] = '<a href="' . htmlspecialchars($url) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) .'</a>'; } } elseif ($this->extClassConf['name'] === TypoScriptTemplateConstantEditorModuleFunctionController::class && !empty($this->MOD_MENU['constant_editor_cat'])) { // SAVE button -- GitLab