[FEATURE] Make the dimensions of feedit popup configurable 17/48617/2
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 20 Jun 2016 19:07:46 +0000 (21:07 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 20 Jun 2016 20:22:07 +0000 (22:22 +0200)
Use TsConfig to change the width & height of the popup used in the
edit panel of EXT:feedit.

Resolves: #18586
Releases: master
Change-Id: Ifbc7ebae75a3454fbfe9a70f0a2b4b1d95a2c094
Reviewed-on: https://review.typo3.org/48617
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Documentation/Changelog/master/Feature-18586-ConfigurableWidthHeightForEditpanelInFeedit.rst [new file with mode: 0644]
typo3/sysext/feedit/Classes/FrontendEditPanel.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-18586-ConfigurableWidthHeightForEditpanelInFeedit.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-18586-ConfigurableWidthHeightForEditpanelInFeedit.rst
new file mode 100644 (file)
index 0000000..3ea1f99
--- /dev/null
@@ -0,0 +1,13 @@
+=====================================================================
+Feature: #18586 - Configurable width & height for editpanel in feedit
+=====================================================================
+
+Description
+===========
+
+It is possible to change the popup's width and height which is used in the edit panel of EXT:feedit by using User TsConfig:
+
+.. code-block:: typoscript
+
+       options.feedit.popupHeight = 700
+       options.feedit.popupWidth = 900
\ No newline at end of file
index 7968218..aaa2024 100644 (file)
@@ -304,7 +304,9 @@ class FrontendEditPanel
      */
     protected function editPanelLinkWrap_doWrap($string, $url, $additionalClasses = '')
     {
-        $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=' . ExtensionManagementUtility::extRelPath('backend') . 'Resources/Private/Templates/Close.html') . ',\'FEquickEditWindow\',\'width=690,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+        $width = MathUtility::forceIntegerInRange($this->backendUser->getTSConfigVal('options.feedit.popupWidth'), 690, 5000, 690);
+        $height = MathUtility::forceIntegerInRange($this->backendUser->getTSConfigVal('options.feedit.popupHeight'), 500, 5000, 500);
+        $onclick = 'vHWin=window.open(' . GeneralUtility::quoteJSvalue($url . '&returnUrl=' . ExtensionManagementUtility::extRelPath('backend') . 'Resources/Private/Templates/Close.html') . ',\'FEquickEditWindow\',\'width=' . $width . ',height=' . $height . ',status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
         return '<a href="#" class="btn btn-default btn-sm ' . htmlspecialchars($additionalClasses) . '" onclick="' . htmlspecialchars($onclick) . '" class="frontEndEditIconLinks">' . $string . '</a>';
     }