From 2c311356b1afcb009a01a3293be56d93fd4b2695 Mon Sep 17 00:00:00 2001 From: Jan Helke Date: Tue, 24 Mar 2015 21:19:14 +0100 Subject: [PATCH] [TASK] Replace IconUtility::skinImg with IconUtility::getSpriteImage Part 1 This patch replaces a lot occurrences of IconUtility::skinImg with IconUtility::getSpriteImage or similar. Thinks that will be ignored in this iteration: \TYPO3\CMS\Backend\Clipboard\Clipboard::printClipboard - Here skinImg returns just the path to use in an select option. This is not possible with getSpriteIcon. \TYPO3\CMS\Backend\Controller\EditDocumentController::getButtons - Here skinImg returns just the path to use for input button. This is not possible with getSpriteIcon. \TYPO3\CMS\Backend\Controller\LoginController - There is no sprite icon replacement for the TYPO3 Logo. \TYPO3\CMS\Backend\Controller\ContentElement\ NewContentElementController::main - No replacement for icon of content wizard availiable. \TYPO3\CMS\Backend\Controller\Wizard\TableController - Here skinImg returns just the path to use for input button. \TYPO3\CMS\Backend\Form - I cowardly refuse to touch FormEngine until Lolli is done :-) \TYPO3\CMS\Backend\History\RecordHistory::linkPage - No icons for revert actions. \TYPO3\CMS\Backend\Template\DocumentTemplate::getBackendFavicon - Here just an URL is returned. \TYPO3\CMS\Backend\Tree\View\AbstractTreeView::getIcon - Could not find out how to trigger that. \TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView::printTree - Could not find out how to trigger that. \TYPO3\CMS\Backend\Tree\View\FolderTreeView::PMicon - Could not find out how to trigger that. \TYPO3\CMS\Backend\Tree\View\FolderTreeView:: getBrowseableTreeForStorage - Could not find out how to trigger that. \TYPO3\CMS\Backend\Tree\View\PagePositionMap::JSimgFunc - Can be ignored, because this function is not used anywhere else in the core and will be marked as deprecated within this patch. \TYPO3\CMS\Backend\Tree\View\PagePositionMap::insertQuadLines - There is no reasonable replacement for the halfline in the sprite icons. \TYPO3\CMS\Backend\View\PageLayoutView::getTable_tt_content - No representation in sprite icons found. \TYPO3\CMS\Backend\View\PageLayoutView::pages_getTree - No representation in sprite icons found. \TYPO3\CMS\Backend\View\PageTreeView - Could not find out how to trigger that. \ext_posMap::wrapRecordHeader (that is in backend/Modules/Layout/index.php) - No representation in sprite icons found. \ext_posMap::wrapRecordHeader (that is in cms/layout/db_layout.php) - No representation in sprite icons found. \TYPO3\CMS\Compatibility6\Controller\Wizard\FormsController::getButtons - Here skinImg returns just the path to use for input button. \TYPO3\CMS\Core\Database\QueryGenerator::getFormElements - Here skinImg returns just the path to use for input button. \TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck::genTree \TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck::genTree_records - Could not find out how to trigger that. \TYPO3\CMS\Fluid\ViewHelpers\Be\PageInfoViewHelper::render - Could not find out how to trigger that. \TYPO3\CMS\Impexp\ImportExport::addRelations - This file does not exists. \TYPO3\CMS\Impexp\LocalPageTree::ext_tree - Could not find out how to trigger that. typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php - There are some dotted tree lines and blinking arrows without replacement. \TYPO3\CMS\Reports\ViewHelpers\IconViewHelper::render - Very generic View Helper \TYPO3\CMS\Rtehtmlarea\BrowseLinks::getUserLinkSelectorHtml - No representation in sprite icons found. \TYPO3\CMS\Rtehtmlarea\PageTree::printTree - No representation in sprite icons found. \TYPO3\CMS\Rtehtmlarea\Controller\UserElementsController::main_user - Could not find out how to trigger that. \TYPO3\CMS\Taskcenter\Controller\TaskModuleController::renderListMenu - Found no task with an individual icon file for the menu on the left side. So could not test. \TYPO3\CMS\Version\View\VersionView::getVersionSelector - No representation in sprite icons found. \TYPO3\CMS\WizardCrpages\Controller\ CreatePagesWizardModuleFunctionController::getTypeSelectHtml - Ignored because we are not able to determain the correct sprite icon from the TCA at this point of time. Resolves: #65992 Releases: master Change-Id: I1071703e8219699353a1d875a6b66a7ed51207b8 Reviewed-on: http://review.typo3.org/38132 Reviewed-by: Anja Leichsenring Tested-by: Anja Leichsenring Reviewed-by: Benjamin Mack Tested-by: Benjamin Mack --- Classes/FrontendEditPanel.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index f9fc971..c44fbc5 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -202,9 +202,13 @@ class FrontendEditPanel { public function editIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArr = array(), $addUrlParamStr = '', $table, $editUid, $fieldList) { // Special content is about to be shown, so the cache must be disabled. $this->frontendController->set_no_cache('Display frontend edit icons', TRUE); - $style = $conf['styleAttribute'] ? ' style="' . htmlspecialchars($conf['styleAttribute']) . '"' : ''; $iconTitle = $this->cObj->stdWrap($conf['iconTitle'], $conf['iconTitle.']); - $iconImg = $conf['iconImg'] ? $conf['iconImg'] : ''; + $optionsArray = array( + 'title' => htmlspecialchars($iconTitle, ENT_COMPAT, 'UTF-8', FALSE), + 'class' => 'frontEndEditIcons', + 'style' => $conf['styleAttribute'] ? htmlspecialchars($conf['styleAttribute']) : '' + ); + $iconImg = $conf['iconImg'] ? $conf['iconImg'] : IconUtility::getSpriteIcon('actions-document-open', $optionsArray); $nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0; $url = BackendUtility::getModuleUrl( @@ -312,4 +316,4 @@ class FrontendEditPanel { return $status; } -} +} \ No newline at end of file