From d67fa0341153b48b47850d73282e481c1a8eb1b2 Mon Sep 17 00:00:00 2001 From: Paul Golmann Date: Wed, 20 Aug 2014 17:00:24 +0200 Subject: [PATCH] [TASK] feedit: Bring back editNoPopup * Restore edit_editNoPopup/forceNoPopup TSConfig options removed in #49640 * Initialize frontend editing when displayFieldEditIcons is set Releases: master, 6.2 Resolves: #61095 Related: #43447 Related: #49640 Change-Id: I900a62b447a1a67265ce22cd73e150646344e090 Reviewed-on: http://review.typo3.org/32279 Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Markus Klein Tested-by: Markus Klein --- Classes/FrontendEditPanel.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index a32042b..e161b02 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -236,7 +236,8 @@ class FrontendEditPanel { } /** - * Creates a link to a script (eg. typo3/alt_doc.php or typo3/db_new.php) which either opens in the current frame OR in a pop-up window. + * Creates a link to a script (eg. typo3/alt_doc.php or typo3/db_new.php) + * which either opens in the current frame OR in a pop-up window. * * @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. @@ -244,8 +245,15 @@ class FrontendEditPanel { * @see editPanelLinkWrap() */ protected function editPanelLinkWrap_doWrap($string, $url) { - $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=close.html') . ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;'; - return '' . $string . ''; + // Open in the current frame? + if ($GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('edit', 'editNoPopup')) { + $href = htmlspecialchars($url . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI'))); + return '' . $string . ''; + } else { + $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=close.html') . + ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;'; + return '' . $string . ''; + } } /**