[FOLLOWUP][TASK] Replace sprite icon "actions-document-open" with IconFactory 92/43192/4
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 12:21:30 +0000 (14:21 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 11 Sep 2015 14:35:13 +0000 (16:35 +0200)
Replaces IconUtility::getSpriteIcon calls for the icon actions-document-open
which have been missed in the initial patchset with the new IconFactory.

Resolves: #68845
Releases: master
Change-Id: I7265c21ec93e1ca15869039329a86fe04e17e940
Reviewed-on: http://review.typo3.org/43192
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/lang/locallang_core.xlf

index f0dd7a1..f5d7508 100644 (file)
@@ -725,7 +725,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                ) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
                                                        ? '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
                                                        . '" title="' . $this->getLanguageService()->getLL('edit', TRUE) . '">'
-                                                       . IconUtility::getSpriteIcon('actions-document-open') . '</a>'
+                                                       . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>'
                                                        : ''
                                                ) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($this->pageRecord['title'], 20));
                                }
index 053b42b..cdfeaaa 100644 (file)
@@ -1169,6 +1169,7 @@ class ExtendedTemplateService extends TemplateService {
                                        $raname = substr(md5($params['name']), 0, 10);
                                        $aname = '\'' . $raname . '\'';
                                        list($fN, $fV, $params, $idName) = $this->ext_fNandV($params);
+                                       $idName = htmlspecialchars($idName);
                                        switch ($typeDat['type']) {
                                                case 'int':
 
@@ -1306,12 +1307,11 @@ class ExtendedTemplateService extends TemplateService {
                                                $deleteIconHTML = '<span title="' . $deleteTitle . '" alt="' . $deleteTitle . '"'
                                                        . ' class="typo3-tstemplate-ceditor-control undoIcon" rel="' . $idName . '">'
                                                        . $deleteIcon . '</span>';
-                                               $editIconHTML = IconUtility::getSpriteIcon('actions-document-open', array(
-                                                       'class' => 'typo3-tstemplate-ceditor-control editIcon',
-                                                       'alt' => 'Edit this Constant',
-                                                       'title' => 'Edit this Constant',
-                                                       'rel' => $idName
-                                               ));
+                                               $editTitle = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.editTitle', TRUE);
+                                               $editIcon = $iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
+                                               $editIconHTML = '<span title="' . $editTitle . '" alt="' . $editTitle . '"'
+                                                       . ' class="typo3-tstemplate-ceditor-control editIcon" rel="' . $idName . '">'
+                                                       . $editIcon . '</span>';
                                                $constantCheckbox = '<input type="hidden" name="' . $checkboxName . '" id="' . $checkboxID . '" value="' . $checkboxValue . '"/>';
                                                // If there's no default value for the field, use a static label.
                                                if (!$params['default_value']) {
index 9ed362c..5899d77 100644 (file)
@@ -110,7 +110,7 @@ class FrontendEditPanel {
                        $panel .= $this->backendUser->adminPanel->ext_makeToolBar();
                }
                if (isset($allow['edit'])) {
-                       $icon = IconUtility::getSpriteIcon('actions-document-open', array('title' => $this->backendUser->extGetLL('p_editRecord')));
+                       $icon = '<span title="' . htmlspecialchars($this->backendUser->extGetLL('p_editRecord')) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</span>';
                        $panel .= $this->editPanelLinkWrap($icon, $formName, 'edit', $dataArr['_LOCALIZED_UID'] ? $table . ':' . $dataArr['_LOCALIZED_UID'] : $currentRecord);
                }
                // Hiding in workspaces because implementation is incomplete
@@ -213,12 +213,9 @@ class FrontendEditPanel {
                // Special content is about to be shown, so the cache must be disabled.
                $this->frontendController->set_no_cache('Display frontend edit icons', TRUE);
                $iconTitle = $this->cObj->stdWrap($conf['iconTitle'], $conf['iconTitle.']);
-               $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);
+               $iconImg = '<span title="' . htmlspecialchars($iconTitle, ENT_COMPAT, 'UTF-8', FALSE) . '" class="frontEndEditIcons" style="' . ($conf['styleAttribute'] ? htmlspecialchars($conf['styleAttribute']) : '') . '">'
+                       . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)
+                       . '</span>';
                $nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
 
                $url = BackendUtility::getModuleUrl(
index 162627b..56b9e7f 100644 (file)
@@ -1230,6 +1230,9 @@ Check also the following points:\n
                        <trans-unit id="labels.deleteTitle">
                                <source>Revert to default Constant</source>
                        </trans-unit>
+                       <trans-unit id="labels.editTitle">
+                               <source>Edit this Constant</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>