[TASK] Remove width/height fields for links in ElementBrowser 90/42690/4
authorMarkus Klein <markus.klein@typo3.org>
Mon, 17 Aug 2015 18:19:15 +0000 (20:19 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 18 Aug 2015 06:03:20 +0000 (08:03 +0200)
Resolves: #69137
Releases: master
Change-Id: I6da10b4531bce9e13a9b062e43fa6b4b1e33c6fb
Reviewed-on: http://review.typo3.org/42690
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Important-69137-LinkWizardPopupWidthAndHeightFieldsRemoved.rst [new file with mode: 0644]
typo3/sysext/lang/locallang_browse_links.xlf
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Documentation/Configuration/PageTsconfig/interfaceConfiguration/Index.rst
typo3/sysext/rtehtmlarea/Resources/Private/Language/locallang_browselinkscontroller.xlf

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-69137-LinkWizardPopupWidthAndHeightFieldsRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-69137-LinkWizardPopupWidthAndHeightFieldsRemoved.rst
new file mode 100644 (file)
index 0000000..44e1495
--- /dev/null
@@ -0,0 +1,13 @@
+=====================================================================
+Important: #69137 - Link Wizard popup width and height fields removed
+=====================================================================
+
+Description
+===========
+
+Opening links in popups with width/height definition is very rare usecase nowadays.
+
+For user convenience, to have less clutter in the UI, the width and height fields have been removed.
+The editor is not able to select a width and height anymore, it can still be entered manually though.
+
+The RTE option ``buttons.link.popupSelector.disabled`` has no effect anymore.
\ No newline at end of file
index 2e3963c..233d586 100644 (file)
                        <trans-unit id="params">
                                <source>Additional link parameters</source>
                        </trans-unit>
-                       <trans-unit id="target_popUpWindow">
-                               <source>Open in window</source>
-                       </trans-unit>
-                       <trans-unit id="target_popUpWindow_width">
-                               <source>Width</source>
-                       </trans-unit>
-                       <trans-unit id="target_popUpWindow_height">
-                               <source>Height</source>
-                       </trans-unit>
                        <trans-unit id="newWindow">
                                <source>New window</source>
                        </trans-unit>
index b1e92ba..6865766 100755 (executable)
@@ -1004,53 +1004,15 @@ class ElementBrowser {
                                                                </select>
                                                        </td>
                                                        <td>';
-                       if (($this->curUrlInfo['act'] == 'page' || $this->curUrlInfo['act'] == 'file' || $this->curUrlInfo['act'] == 'folder')
+                       if (($this->curUrlInfo['act'] === 'page' || $this->curUrlInfo['act'] === 'file' || $this->curUrlInfo['act'] === 'folder')
                                && $this->curUrlArray['href'] && $this->curUrlInfo['act'] === $this->act
                        ) {
                                $ltarget .= '
                                                        <input class="btn btn-default" type="submit" value="' . $lang->getLL('update', TRUE)
                                                                . '" onclick="return link_current();" />';
                        }
-                       $selectJS = '
-                               if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0'
-                                       . ' && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0) {
-                                       document.ltargetform.ltarget.value = document.ltargetform.popup_width.options['
-                                               . 'document.ltargetform.popup_width.selectedIndex].value+"x"'
-                                               . '+document.ltargetformbrowse_links_setTarget.popup_height.options['
-                                               . 'document.ltargetform.popup_height.selectedIndex].value;
-                                       browse_links_setTarget(document.ltargetform.ltarget.value);
-                                       browse_links_setClass(document.lclassform.lclass.value);
-                                       browse_links_setTitle(document.ltitleform.ltitle.value);
-                                       browse_links_setParams(document.lparamsform.lparams.value);
-                                       document.ltargetform.popup_width.selectedIndex=0;
-                                       document.ltargetform.popup_height.selectedIndex=0;
-                               }
-                       ';
                        $ltarget .= '           </td>
                                                </tr>
-                                               <tr>
-                                                       <td>' . $lang->getLL('target_popUpWindow', TRUE) . ':</td>
-                                                       <td colspan="3">
-                                                               <select name="popup_width" onchange="' . htmlspecialchars($selectJS) . '">
-                                                                       <option value="0">' . $lang->getLL('target_popUpWindow_width', TRUE) . '</option>
-                                                                       <option value="300">300</option>
-                                                                       <option value="400">400</option>
-                                                                       <option value="500">500</option>
-                                                                       <option value="600">600</option>
-                                                                       <option value="700">700</option>
-                                                                       <option value="800">800</option>
-                                                               </select>
-                                                               x
-                                                               <select name="popup_height" onchange="' . htmlspecialchars($selectJS) . '">
-                                                                       <option value="0">' . $lang->getLL('target_popUpWindow_height', TRUE) . '</option>
-                                                                       <option value="200">200</option>
-                                                                       <option value="300">300</option>
-                                                                       <option value="400">400</option>
-                                                                       <option value="500">500</option>
-                                                                       <option value="600">600</option>
-                                                               </select>
-                                                       </td>
-                                               </tr>
                                        </table>
                                </form>';
                        // Add "target selector" box to content:
index 6db632b..8e053b2 100644 (file)
@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Rtehtmlarea;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -668,19 +667,15 @@ class BrowseLinks extends ElementBrowser {
                        return '';
                }
                $targetSelectorConfig = array();
-               $popupSelectorConfig = array();
                if (is_array($this->buttonConfig['targetSelector.'])) {
                        $targetSelectorConfig = $this->buttonConfig['targetSelector.'];
                }
-               if (is_array($this->buttonConfig['popupSelector.'])) {
-                       $popupSelectorConfig = $this->buttonConfig['popupSelector.'];
-               }
                // Reset the target to default if we changed tab
                $currentTarget = $this->curUrlInfo['act'] === $this->act && isset($this->curUrlArray['target']) ? $this->curUrlArray['target'] : '';
                $target = $currentTarget ?: $this->defaultLinkTarget;
                $lang = $this->getLanguageService();
                $ltarget = '
-                               <tr id="ltargetrow"' . ($targetSelectorConfig['disabled'] && $popupSelectorConfig['disabled'] ? ' style="display: none;"' : '') . '>
+                               <tr id="ltargetrow"' . ($targetSelectorConfig['disabled'] ? ' style="display: none;"' : '') . '>
                                        <td><label>' . $lang->getLL('target', TRUE) . ':</label></td>
                                        <td><input type="text" name="ltarget" onchange="browse_links_setTarget(this.value);" value="'
                                        . htmlspecialchars($target) . '"' . $this->doc->formWidth(10) . ' /></td>';
@@ -697,38 +692,6 @@ class BrowseLinks extends ElementBrowser {
                $ltarget .= '
                                        </td>
                                </tr>';
-               if (!$popupSelectorConfig['disabled']) {
-                       $selectJS = 'if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0 && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0) {
-                               document.ltargetform.ltarget.value = document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value+\'x\'+document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value;
-                               browse_links_setTarget(document.ltargetform.ltarget.value);
-                               document.ltargetform.popup_width.selectedIndex=0;
-                               document.ltargetform.popup_height.selectedIndex=0;
-                       }';
-                       $ltarget .= '
-                                       <tr>
-                                               <td><label>' . $lang->getLL('target_popUpWindow', TRUE) . ':</label></td>
-                                               <td colspan="3">
-                                                       <select name="popup_width" onchange="' . $selectJS . '">
-                                                               <option value="0">' . $lang->getLL('target_popUpWindow_width', TRUE) . '</option>
-                                                               <option value="300">300</option>
-                                                               <option value="400">400</option>
-                                                               <option value="500">500</option>
-                                                               <option value="600">600</option>
-                                                               <option value="700">700</option>
-                                                               <option value="800">800</option>
-                                                       </select>
-                                                       x
-                                                       <select name="popup_height" onchange="' . $selectJS . '">
-                                                               <option value="0">' . $lang->getLL('target_popUpWindow_height', TRUE) . '</option>
-                                                               <option value="200">200</option>
-                                                               <option value="300">300</option>
-                                                               <option value="400">400</option>
-                                                               <option value="500">500</option>
-                                                               <option value="600">600</option>
-                                                       </select>
-                                               </td>
-                                       </tr>';
-               }
                return $ltarget;
        }
 
index 9c92d19..dfaa21f 100644 (file)
@@ -1651,27 +1651,6 @@ buttons.link.targetSelector.disabled
 
 
 
-.. _buttons-link-popupselector-disabled:
-
-buttons.link.popupSelector.disabled
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. container:: table-row
-
-   Property
-         buttons.link.popupSelector.disabled
-
-   Data type
-         boolean
-
-   Description
-         If set, the selection of a popup window as link target is removed from
-         the link insertion/update dialog.
-
-         Default: 0
-
-
-
 .. _buttons-link-pageidselector-enabled:
 
 buttons.link.pageIdSelector.enabled
index bda154e..7bbeae1 100644 (file)
                        <trans-unit id="linkRelationship">
                                <source>Relationship</source>
                        </trans-unit>
-                       <trans-unit id="target_popUpWindow">
-                               <source>Open in window</source>
-                       </trans-unit>
-                       <trans-unit id="target_popUpWindow_width">
-                               <source>Width</source>
-                       </trans-unit>
-                       <trans-unit id="target_popUpWindow_height">
-                               <source>Height</source>
-                       </trans-unit>
                        <trans-unit id="anchor_class">
                                <source>Style</source>
                        </trans-unit>