[TASK] Replace sprite icon "actions-system-shortcut-new" with IconFactory 50/43050/4
authorMichael Oehlhof <typo3@oehlhof.de>
Sat, 5 Sep 2015 09:31:03 +0000 (11:31 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Mon, 7 Sep 2015 08:25:20 +0000 (10:25 +0200)
Replaces IconUtility::getSpriteIcon call for the icon
actions-system-shortcut-new with the new IconFactory
inside the description of the shortcut drop down.

Resolves: #69547
Releases: master
Change-Id: I4f91b3fb6ce68764639aefe63126c097d462ef19
Reviewed-on: http://review.typo3.org/43050
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index f4c0c4a..9051821 100644 (file)
@@ -181,9 +181,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                if (count($shortcutMenu) === 2) {
                        // No shortcuts added yet, show a small help message how to add shortcuts
                        $title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarks', TRUE);
-                       $icon = IconUtility::getSpriteIcon('actions-system-shortcut-new', array(
-                               'title' => $title
-                       ));
+                       $icon = '<span title="' . $title . '">' . $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL) . '</span>';
                        $label = str_replace('%icon%', $icon, $languageService->sL('LLL:EXT:lang/locallang_misc.xlf:bookmarkDescription'));
                        $compiledShortcutMenu = '<p>' . $label . '</p>';
                } else {
index 7fdf20b..22eb396 100644 (file)
@@ -668,7 +668,7 @@ function jumpToUrl(URL) {
 
                if ($shortcutExist) {
                        return '<a class="active" title="">' .
-                               IconUtility::getSpriteIcon('actions-system-shortcut-new') . '</a>';
+                       $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL) . '</a>';
                }
 
                $url = GeneralUtility::quoteJSvalue(rawurlencode($shortcutUrl));
@@ -677,7 +677,7 @@ function jumpToUrl(URL) {
 
                return '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' .
                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.makeBookmark', TRUE) . '">' .
-                       IconUtility::getSpriteIcon('actions-system-shortcut-new') . '</a>';
+                       $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL) . '</a>';
        }
 
        /**
index 6162ee0..70b9d8c 100644 (file)
@@ -400,6 +400,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'refresh',
                        )
                ),
+               'actions-system-shortcut-new' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/actions/system-shortcut-new.png',
+                       )
+               ),
                'actions-system-refresh' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(