[TASK] Replace icon by IconFactory: actions-page-open 62/43062/3
authorBenjamin Kott <benjamin.kott@outlook.com>
Sat, 5 Sep 2015 21:44:49 +0000 (23:44 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 6 Sep 2015 12:33:45 +0000 (14:33 +0200)
Resolves: #69556
Releases: master
Change-Id: I697aaee1db8b03adafa015e6634156b576f3c381
Reviewed-on: http://review.typo3.org/43062
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Build/Gruntfile.js
Build/Resources/Private/Icons/Action/actions-page-open.svg [new file with mode: 0644]
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Resources/Public/Icons/Action/actions-page-open.svg [new file with mode: 0644]
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/t3skin/Classes/Slot/IconStyleModifier.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php

index 8995453..459c4a3 100644 (file)
@@ -136,6 +136,7 @@ module.exports = function(grunt) {
                                        '<%= paths.backend %>Public/Icons/Action/actions-document-save-translation.svg': '<%= paths.icons %>Action/actions-document-save-translation.svg',
                                        '<%= paths.backend %>Public/Icons/Action/actions-document-save-view.svg': '<%= paths.icons %>Action/actions-document-save-view.svg',
                                        '<%= paths.backend %>Public/Icons/Action/actions-document-save.svg': '<%= paths.icons %>Action/actions-document-save.svg',
+                                       '<%= paths.backend %>Public/Icons/Action/actions-page-open.svg': '<%= paths.icons %>Action/actions-page-open.svg',
                                        '<%= paths.backend %>Public/Icons/Action/actions-system-cache-clear-impact-high.svg': '<%= paths.icons %>Action/actions-system-cache-clear-impact-high.svg',
                                        '<%= paths.backend %>Public/Icons/Action/actions-system-cache-clear-impact-low.svg': '<%= paths.icons %>Action/actions-system-cache-clear-impact-low.svg',
                                        '<%= paths.backend %>Public/Icons/Action/actions-system-cache-clear-impact-medium.svg': '<%= paths.icons %>Action/actions-system-cache-clear-impact-medium.svg',
diff --git a/Build/Resources/Private/Icons/Action/actions-page-open.svg b/Build/Resources/Private/Icons/Action/actions-page-open.svg
new file mode 100644 (file)
index 0000000..7e4865b
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="actions-page-open" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
+        y="0px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
+ <g id="page-open">
+       <path d="M13,13.16V14h-0.84l-1,1h2.34c0.28,0,0.5-0.22,0.5-0.5v-2.34L13,13.16z"/>
+       <path d="M5,14H3V2h6v3.5C9,5.78,9.22,6,9.5,6h2.34l0.46-0.46c0.41-0.42,1.06-0.59,1.67-0.47c-0.05-0.39-0.26-0.85-0.51-1.1
+               l-2.44-2.44C10.74,1.24,10.16,1,9.75,1H2.5C2.22,1,2,1.22,2,1.5v13C2,14.78,2.22,15,2.5,15H5V14z M10,2.06
+               c0,0.05,0.27,0.12,0.32,0.17l2.45,2.45C12.82,4.73,12.89,5,12.94,5H10V2.06z"/>
+       <path d="M14.24,10.51L8.75,16H6v-2.75l5.49-5.49L14.24,10.51z M9,14.55L7.45,13l-0.6,0.6v0.71h0.84v0.84H8.4L9,14.55z M11.7,8.88
+               c-0.04,0-0.08,0.01-0.11,0.05l-3.58,3.58c-0.03,0.03-0.05,0.07-0.05,0.11c0,0.09,0.06,0.14,0.15,0.14c0.04,0,0.08-0.01,0.11-0.05
+               l3.58-3.58c0.03-0.03,0.05-0.07,0.05-0.11C11.85,8.94,11.79,8.88,11.7,8.88z M15.76,8.99l-1.1,1.1l-2.75-2.75l1.1-1.09
+               C13.16,6.09,13.38,6,13.6,6c0.22,0,0.44,0.09,0.6,0.25l1.55,1.54C15.91,7.95,16,8.17,16,8.4C16,8.62,15.91,8.84,15.76,8.99z"/>
+</g>
+</svg>
index a8c207b..ccebd2a 100644 (file)
@@ -680,7 +680,7 @@ class ClickMenu {
                $url = BackendUtility::getModuleUrl('record_edit', array(
                        'edit[pages][' . $uid . ']' => 'edit'
                ));
-               return $this->linkItem($this->languageService->makeEntities($this->languageService->getLL('CM_editPageProperties')), IconUtility::getSpriteIcon('actions-page-open'), $this->urlRefForCM($url, 'returnUrl'), 1);
+               return $this->linkItem($this->languageService->makeEntities($this->languageService->getLL('CM_editPageProperties')), $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL), $this->urlRefForCM($url, 'returnUrl'), 1);
        }
 
        /**
@@ -1006,7 +1006,7 @@ class ClickMenu {
                }
 
                $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=' . GeneralUtility::quoteJSvalue($scriptUrl . '&target=' . rawurlencode($path)) . ($noReturnUrl ? '' : '+\'&returnUrl=\'+top.rawurlencode(' . $this->frameLocation($loc . '.document') . '.pathname+' . $this->frameLocation($loc . '.document') . '.search)') . ';}';
-               return $this->linkItem($this->label($type), IconUtility::getSpriteIcon($iconName), $editOnClick . 'top.nav.refresh();');
+               return $this->linkItem($this->label($type), $this->iconFactory->getIcon($iconName, Icon::SIZE_SMALL), $editOnClick . 'top.nav.refresh();');
        }
 
        /**
index 1bbdfcc..520a7bd 100755 (executable)
@@ -1192,11 +1192,9 @@ class PageLayoutController {
 
                                // Edit page properties
                                $editPageOnClick = htmlspecialchars(BackendUtility::editOnClick('&edit[pages][' . $this->id . ']=edit'));
-                               $buttons['edit_page'] = '<a href="#" ' .
-                                       'onclick="' . $editPageOnClick . '"' .
-                                       'title="' . $lang->getLL('editPageProperties', TRUE) . '">' .
-                                       IconUtility::getSpriteIcon('actions-page-open') .
-                                       '</a>';
+                               $buttons['edit_page'] = '<a href="#" onclick="' . $editPageOnClick . '" title="' . $lang->getLL('editPageProperties', TRUE) . '">'
+                                       . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)
+                                       . '</a>';
                        }
 
                        // Add CSH (Context Sensitive Help) icon to tool bar
diff --git a/typo3/sysext/backend/Resources/Public/Icons/Action/actions-page-open.svg b/typo3/sysext/backend/Resources/Public/Icons/Action/actions-page-open.svg
new file mode 100644 (file)
index 0000000..353c6a3
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13 13.16V14h-.84l-1 1h2.34c.28 0 .5-.22.5-.5v-2.34l-1 1zM5 14H3V2h6v3.5c0 .28.22.5.5.5h2.34l.46-.46c.41-.42 1.06-.59 1.67-.47-.05-.39-.26-.85-.51-1.1l-2.44-2.44c-.28-.29-.86-.53-1.27-.53H2.5c-.28 0-.5.22-.5.5v13c0 .28.22.5.5.5H5v-1zm5-11.94c0 .05.27.12.32.17l2.45 2.45c.05.05.12.32.17.32H10V2.06z"/><path d="M14.24 10.51L8.75 16H6v-2.75l5.49-5.49 2.75 2.75zM9 14.55L7.45 13l-.6.6v.71h.84v.84h.71l.6-.6zm2.7-5.67c-.04 0-.08.01-.11.05l-3.58 3.58c-.03.03-.05.07-.05.11 0 .09.06.14.15.14.04 0 .08-.01.11-.05l3.58-3.58c.03-.03.05-.07.05-.11 0-.08-.06-.14-.15-.14zm4.06.11l-1.1 1.1-2.75-2.75 1.1-1.09c.15-.16.37-.25.59-.25.22 0 .44.09.6.25l1.55 1.54c.16.16.25.38.25.61 0 .22-.09.44-.24.59z"/></svg>
\ No newline at end of file
index f61165c..77ef1d2 100644 (file)
@@ -305,9 +305,9 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                        )
                ),
                'actions-page-open' => array(
-                       'provider' => FontawesomeIconProvider::class,
+                       'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'name' => 'pencil-square-o',
+                               'source' => 'EXT:backend/Resources/Public/Icons/Action/actions-page-open.svg',
                        )
                ),
                'actions-system-cache-clear-impact-low' => array(
index b02deba..56c9253 100644 (file)
@@ -895,7 +895,9 @@ class FileList extends AbstractRecordList {
                if ($fileOrFolderObject instanceof File && $fileOrFolderObject->checkActionPermission('write') && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], $fileOrFolderObject->getExtension())) {
                        $url = BackendUtility::getModuleUrl('file_edit', array('target' => $fullIdentifier));
                        $editOnClick = 'top.content.list_frame.location.href=' . GeneralUtility::quoteJSvalue($url) . '+\'&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;';
-                       $cells['edit'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($editOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.editcontent') . '">' . IconUtility::getSpriteIcon('actions-page-open') . '</a>';
+                       $cells['edit'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($editOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.editcontent') . '">'
+                               . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)
+                               . '</a>';
                } else {
                        $cells['edit'] = $this->spaceIcon;
                }
index 9d745a1..ec182d3 100644 (file)
@@ -272,9 +272,9 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                // Edit
                                $params = '&edit[pages][' . $this->pageRow['uid'] . ']=edit';
                                $onClick = htmlspecialchars(BackendUtility::editOnClick($params, '', -1));
-                               $buttons['edit'] = '<a href="#" onclick="' . $onClick . '" title="'
-                                       . $lang->getLL('editPage', TRUE) . '">'
-                                       . IconUtility::getSpriteIcon('actions-page-open') . '</a>';
+                               $buttons['edit'] = '<a href="#" onclick="' . $onClick . '" title="' . $lang->getLL('editPage', TRUE) . '">'
+                                       . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)
+                                       . '</a>';
                        }
                        // Paste
                        if (($localCalcPerms & Permission::PAGE_NEW || $localCalcPerms & Permission::CONTENT_EDIT) && $this->editLockPermissions()) {
index 14fa99c..97fe5cf 100644 (file)
@@ -65,7 +65,6 @@ class IconStyleModifier {
                't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-up' => 'fa-angle-up',
                't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-move' => 'fa-arrows',
                't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-new' => 'fa-plus-square',
-               't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-open' => 'fa-pencil',
                // @todo t3-btn-* is still used in FormEngine.js refactor to use data attributes in HTML
                't3-icon t3-icon-actions t3-icon-actions-selection t3-icon-selection-delete t3-btn t3-btn-removeoption' => 'fa-times t3-btn t3-btn-removeoption',
                't3-icon t3-icon-actions t3-icon-actions-selection t3-icon-selection-delete' => 'fa-remove',
index de1d1be..31ae616 100644 (file)
@@ -514,7 +514,9 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        // Perform some access checks:
                        $a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
                        $a_wp = $GLOBALS['BE_USER']->check('modules', $pageModule);
-                       $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'' . $pageModule . '\'); return false;">' . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL) . '</a>';
+                       $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'' . $pageModule . '\'); return false;">'
+                               . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)
+                               . '</a>';
                        $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL) . '</a>';
                        // "View page" icon is added:
                        $adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';