From 4e5dc904ba6000e7dd9da8be85067ca437da7b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Na=CC=88gler?= Date: Fri, 23 Oct 2015 15:10:14 +0200 Subject: [PATCH] [TASK] Streamline FE-Edit toolbar and buttons Resolves: #70971 Releases: master Change-Id: I5351563d1c49fb061ddd84e17a99d971054f2b92 Reviewed-on: https://review.typo3.org/44242 Reviewed-by: Andreas Fernandez Tested-by: Andreas Fernandez Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn --- Classes/FrontendEditPanel.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index 264848e..14679f3 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -125,10 +125,10 @@ class FrontendEditPanel // Hiding for localizations because it is unknown what should be the function in that case if (isset($allow['hide']) && $hideField && $this->backendUser->workspace === 0 && !$dataArr['_LOCALIZED_UID']) { if ($dataArr[$hideField]) { - $icon = $this->iconFactory->getIcon('actions-edit-unhide')->render(); + $icon = $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL)->render(); $panel .= $this->editPanelLinkWrap($icon, $formName, 'unhide'); } else { - $icon = $this->iconFactory->getIcon('actions-edit-hide')->render(); + $icon = $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL)->render(); $panel .= $this->editPanelLinkWrap($icon, $formName, 'hide', '', $this->backendUser->extGetLL('p_hideConfirm')); } } @@ -164,7 +164,9 @@ class FrontendEditPanel
' - . $panel . + . '
' + . $panel + . '
' . ($labelTxt ? '
' . sprintf($labelTxt, htmlspecialchars(GeneralUtility::fixed_lgd_cs($dataArr[$labelField], 50))) . '
' : '') . '
'; @@ -232,7 +234,7 @@ class FrontendEditPanel 'noView' => $nV ) ) . $addUrlParamStr; - $icon = $this->editPanelLinkWrap_doWrap($iconImg, $url); + $icon = $this->editPanelLinkWrap_doWrap($iconImg, $url, 'content-link'); if ($conf['beforeLastTag'] < 0) { $content = $icon . $content; } elseif ($conf['beforeLastTag'] > 0) { @@ -285,7 +287,7 @@ class FrontendEditPanel } else { $cf1 = ($cf2 = ''); } - $out = '' . $string . ''; + $out = '' . $string . ''; } return $out; } @@ -295,13 +297,14 @@ class FrontendEditPanel * * @param string $string The string to wrap in a link, typ. and image used as button in the edit panel. * @param string $url The URL of the link. Should be absolute if supposed to work with path set. + * @param string $additionalClasses Additional CSS classes * @return string A tag wrapped string. * @see editPanelLinkWrap() */ - protected function editPanelLinkWrap_doWrap($string, $url) + protected function editPanelLinkWrap_doWrap($string, $url, $additionalClasses = '') { $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=sysext/backend/Resources/Private/Templates/Close.html') . ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;'; - return '' . $string . ''; + return '' . $string . ''; } /**