[TASK] Replace sprite icon "actions-document-save" with the new IconFactory 73/42973/6
authorMichael Oehlhof <typo3@oehlhof.de>
Tue, 1 Sep 2015 22:14:46 +0000 (00:14 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 4 Sep 2015 08:15:54 +0000 (10:15 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-document-save with the new IconFactory.

Resolves: #68866
Releases: master
Change-Id: I29540eed175d642fae67a5b4453520c926cd2cae
Reviewed-on: http://review.typo3.org/42973
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
12 files changed:
typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
typo3/sysext/compatibility6/Classes/Controller/Wizard/FormsController.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/t3skin/Resources/Public/Css/backend.css
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index dd4f46d..dd4b3fc 100644 (file)
@@ -232,7 +232,7 @@ class BackendLayoutWizardController implements \TYPO3\CMS\Core\Http\ControllerIn
                $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.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</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;">' . $iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>';
                $content .= $this->doc->spacer(10);
index 7b885a4..1301190 100644 (file)
@@ -1126,11 +1126,14 @@ class EditDocumentController implements \TYPO3\CMS\Core\Http\ControllerInterface
                        'translation_save' => '',
                        'translation_saveclear' => ''
                );
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                // Render SAVE type buttons:
                // The action of each button is decided by its name attribute. (See doProcessData())
                if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']) {
                        // SAVE button:
-                       $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="submit" name="_savedok" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" />'));
+                       $iconSave = $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL);
+                       $buttons['save'] = '<a href="#" class="t3js-editform-submitButton" onclick="document.editform.submit();" name="_savedok" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">' . $iconSave . '</a>';
                        // SAVE / VIEW button:
                        if ($this->viewId && !$this->noView && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) {
                                $pagesTSconfig = BackendUtility::getPagesTSconfig($this->pageinfo['uid']);
index 212c4f6..7963385 100644 (file)
@@ -247,7 +247,7 @@ class EditFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                // CSH button
                $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_edit');
                // Save button
-               $theIcon = IconUtility::getSpriteIcon('actions-document-save');
+               $theIcon = $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL);
                $buttons['SAVE'] = '<a href="#" onclick="document.editform.submit();" title="' . $lang->makeEntities($lang->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.submit', TRUE)) . '">' . $theIcon . '</a>';
                // Save and Close button
                $theIcon = IconUtility::getSpriteIcon('actions-document-save-close');
index 80b4eee..587dd95 100755 (executable)
@@ -1207,8 +1207,8 @@ class PageLayoutController {
                        }
                        if ($function == 'quickEdit') {
                                // Save record
-                               $buttons['savedok'] = '<button class="c-inputButton" name="_savedok_x" value="1">'
-                                       . IconUtility::getSpriteIcon('actions-document-save', array('title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE)))
+                               $buttons['savedok'] = '<button class="c-inputButton" name="_savedok_x" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                                       . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
                                        . '</button>';
                                // Save and close
                                $buttons['save_close'] = '<button class="c-inputButton" name="_saveandclosedok_x" value="1">'
index d143118..d79211b 100644 (file)
@@ -250,8 +250,9 @@ class RteController extends AbstractWizardController implements \TYPO3\CMS\Core\
                        // 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) . '">' . $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)))
+                       $buttons['save'] = '<button class="c-inputButton" name="_savedok_x" onclick="TBE_EDITOR.checkAndDoSubmit(1); return false;" title="'
+                               . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                               . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
                                . '</button>';
                        // Save & View
                        $buttons['save_view'] = '<button class="c-inputButton" name="_savedokview_x" onclick="' . htmlspecialchars('document.editform.redirect.value+=\'&popView=1\'; TBE_EDITOR.checkAndDoSubmit(1); return false;') . '">'
index b69fa97..f4dda2d 100644 (file)
@@ -220,7 +220,9 @@ class TableController extends AbstractWizardController implements \TYPO3\CMS\Cor
                        $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)));
+                       $buttons['save'] = '<button class="c-inputButton" name="savedok" value="1" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                               . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
+                               . '</button>';
                        // Save & Close
                        $buttons['save_close'] = IconUtility::getSpriteIcon('actions-document-save-close', array('html' => '<button class="c-inputButton" name="saveandclosedok" value="1"></button>', 'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE)));
                        // Reload
index 4c35b29..5fdf268 100644 (file)
@@ -189,7 +189,7 @@ class PermissionAjaxController {
                $elementId = 'o_' . $page;
                $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>';
+               $saveButton = '<a class="saveowner" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</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>';
        }
@@ -231,7 +231,7 @@ class PermissionAjaxController {
                $elementId = 'g_' . $page;
                $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>';
+               $saveButton = '<a class="savegroup" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</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>';
        }
index 4f3f72c..14bde8c 100644 (file)
@@ -270,7 +270,7 @@ class FormsController extends \TYPO3\CMS\Backend\Controller\Wizard\AbstractWizar
                        // Close
                        $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(unescape(\'' . rawurlencode(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>';
                        // Save
-                       $buttons['save'] = '<button class="c-inputButton" name="savedok" value="1">' . IconUtility::getSpriteIcon('actions-document-save', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE))) . '</button>';
+                       $buttons['save'] = '<button class="c-inputButton" name="savedok" value="1" title=' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '>' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</button>';
                        // Save & Close
                        $buttons['save_close'] = '<button class="c-inputButton" name="saveandclosedok" value="1">' . IconUtility::getSpriteIcon('actions-document-save-close', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE))) . '</button>';
                        // Reload
index b6010f5..2b96a01 100644 (file)
@@ -1531,7 +1531,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) . '">' . $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['save'] = '<button name="CMD" value="save" class="c-inputButton" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:save', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</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>';
                }
index b3e19e6..4c68d1c 100644 (file)
@@ -16,7 +16,8 @@ namespace TYPO3\CMS\Setup\Controller;
 
 use TYPO3\CMS\Backend\Backend\Avatar\DefaultAvatarProvider;
 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\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
@@ -453,14 +454,16 @@ class SetupModuleController {
         * @return array All available buttons as an assoc. array
         */
        protected function getButtons() {
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $buttons = array(
                        'csh' => '',
                        'save' => '',
                        'shortcut' => ''
                );
                $buttons['csh'] = BackendUtility::cshItem('_MOD_user_setup', '');
-               $buttons['save'] = '<button class="c-inputButton" name="data[save]">'
-                       . IconUtility::getSpriteIcon('actions-document-save', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE)))
+               $buttons['save'] = '<button class="c-inputButton" name="data[save]" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                       . $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
                        . '</button>';
                if ($this->getBackendUser()->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->moduleName);
index c2f602b..914de91 100644 (file)
@@ -1,14 +1,14 @@
-/*!\r
- * This file is part of the TYPO3 CMS project.\r
- *\r
- * It is free software; you can redistribute it and/or modify it under\r
- * the terms of the GNU General Public License, either version 2\r
- * of the License, or any later version.\r
- *\r
- * For the full copyright and license information, please read the\r
- * LICENSE.txt file that was distributed with this source code.\r
- *\r
- * The TYPO3 project - inspiring people to share!\r
+/*!
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
  */
 /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
 html {
index efa88d4..d11ffc1 100755 (executable)
@@ -293,8 +293,8 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
                                        // no NEW-button while edit
                                        $buttons['new'] = '';
                                        // SAVE button
-                                       $buttons['save'] = '<button type="submit" class="c-inputButton" name="submit" value="1">'
-                                               . IconUtility::getSpriteIcon('actions-document-save', array('title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE)))
+                                       $buttons['save'] = '<button type="submit" class="c-inputButton" name="submit" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                                               . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
                                                . '</button>';
                                        // SAVE AND CLOSE button
                                        $buttons['save_close'] = '<button type="submit" class="c-inputButton" name="saveclose" value="1">'
@@ -306,8 +306,8 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
                                }
                        } elseif ($this->extClassConf['name'] === TypoScriptTemplateConstantEditorModuleFunctionController::class && !empty($this->MOD_MENU['constant_editor_cat'])) {
                                // SAVE button
-                               $buttons['save'] = '<button class="c-inputButton" name="submit" value="1">'
-                                       . IconUtility::getSpriteIcon('actions-document-save', array('title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE)))
+                               $buttons['save'] = '<button class="c-inputButton" name="submit" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
+                                       . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)
                                        . '</button>';
                        } elseif ($this->extClassConf['name'] === TypoScriptTemplateObjectBrowserModuleFunctionController::class) {
                                if (!empty($this->sObj)) {