[TASK] Replace icon by the IconFactory actions-window-open 80/43080/2
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 7 Sep 2015 07:43:53 +0000 (09:43 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 7 Sep 2015 16:13:20 +0000 (18:13 +0200)
Resolves: #69575
Releases: master
Change-Id: I62ff951816107fd9f7e656065781b29a433f4dae
Reviewed-on: http://review.typo3.org/43080
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php

index 03e4044..7452313 100644 (file)
@@ -1304,7 +1304,7 @@ class EditDocumentController implements \TYPO3\CMS\Core\Http\ControllerInterface
                        return '';
                }
                $aOnClick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue(GeneralUtility::linkThisScript(array('returnUrl' => 'sysext/backend/Resources/Private/Templates/Close.html'))) . ',' . GeneralUtility::quoteJSvalue(md5($this->R_URI)) . ',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
-               return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">' . IconUtility::getSpriteIcon('actions-window-open') . '</a>';
+               return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">' . $this->iconFactory->getIcon('actions-window-open', Icon::SIZE_SMALL)->render() . '</a>';
        }
 
        /***************************
index 6465a5a..403ac28 100644 (file)
@@ -466,6 +466,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'arrow-right',
                        )
                ),
+               'actions-window-open' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'arrows-alt',
+                       )
+               ),
 
                'mimetypes-word' => array(
                        'provider' => FontawesomeIconProvider::class,
index b582f6e..9229e38 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Taskcenter\Controller;
 
 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\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -416,11 +418,12 @@ class TaskModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
         * @return string Hyperlink with icon and appropriate JavaScript
         */
        protected function openInNewWindow() {
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $url = GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
                $onClick = 'devlogWin=window.open(' . GeneralUtility::quoteJSvalue($url) . ',\'taskcenter\',\'width=790,status=0,menubar=1,resizable=1,location=0,scrollbars=1,toolbar=0\');return false;';
-               $content = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' .
-                       IconUtility::getSpriteIcon('actions-window-open', array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE))) .
-               '</a>';
+               $content = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">'
+                       . $iconFactory->getIcon('actions-window-open', Icon::SIZE_SMALL)->render()
+               '</a>';
                return $content;
        }