[FEATURE] RTE: Add property buttons.link.type.properties.target.default 57/36757/2
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 9 Feb 2015 04:22:04 +0000 (23:22 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 11 Feb 2015 00:02:52 +0000 (01:02 +0100)
New RTE configuration property
buttons.link.[*type*].properties.target.default
may be used in Page TSconfig to configure a default target for links
of a given type.

Releases: master
Resolves: #59646
Change-Id: I26348562120630c98b709a399aa3663b5f33729e
Reviewed-on: http://review.typo3.org/36757
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
typo3/sysext/core/Documentation/Changelog/master/Feature-59646-AddRteConfigurationPropertyButtonsLinkTypePropertiesTargetDefault.rst [new file with mode: 0644]
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Documentation/Configuration/PageTsconfig/interfaceConfiguration/Index.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-59646-AddRteConfigurationPropertyButtonsLinkTypePropertiesTargetDefault.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-59646-AddRteConfigurationPropertyButtonsLinkTypePropertiesTargetDefault.rst
new file mode 100644 (file)
index 0000000..4ef2526
--- /dev/null
@@ -0,0 +1,11 @@
+================================================================================================
+Feature: #59646 - Add RTE configuration property buttons.link.[*type*].properties.target.default
+================================================================================================
+
+Description
+===========
+
+New RTE configuration property buttons.link.[*type*].properties.target.default may be used
+in Page TSconfig to configure a default target for links of a given type.
+
+Possible link types are: page, file, url, mail, spec. More types may be provided by extensions.
index b7d5318..41e87ce 100644 (file)
@@ -251,11 +251,17 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                        }
                }
                // Initializing the target value
-               // Unset the target if it is set to a value different than default and if no class is selected and the target field is not displayed
+               // Unset the target if it is set to a value different than default and the target field is not displayed
                // In other words, do not forward the target if we changed tab and the target field is not displayed
-               $this->defaultLinkTarget = isset($this->buttonConfig['properties.']['target.']['default']) ? $this->buttonConfig['properties.']['target.']['default'] : '';
+               $this->defaultLinkTarget = $classSelected[$this->act] && $this->classesAnchorDefault[$this->act] && $this->classesAnchorDefaultTarget[$this->act]
+                       ? $this->classesAnchorDefaultTarget[$this->act]
+                       : (isset($this->buttonConfig[$this->act . '.']['properties.']['target.']['default'])
+                               ? $this->buttonConfig[$this->act . '.']['properties.']['target.']['default']
+                               : (isset($this->buttonConfig['properties.']['target.']['default'])
+                                       ? $this->buttonConfig['properties.']['target.']['default']
+                                       : ''));
                $this->setTarget = '';
-               if (isset($this->curUrlArray['target']) && !($this->curUrlArray['target'] != $this->defaultLinkTarget && !$classSelected[$this->act] && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled'] && is_array($this->buttonConfig['popupSelector.']) && $this->buttonConfig['popupSelector.']['disabled'])) {
+               if (isset($this->curUrlArray['target']) && !($this->curUrlArray['target'] != $this->defaultLinkTarget && is_array($this->buttonConfig['targetSelector.']) && $this->buttonConfig['targetSelector.']['disabled'] && is_array($this->buttonConfig['popupSelector.']) && $this->buttonConfig['popupSelector.']['disabled'])) {
                        $this->setTarget = $this->curUrlArray['target'];
                }
                if ($this->defaultLinkTarget && !isset($this->curUrlArray['target'])) {
@@ -828,11 +834,7 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                if (is_array($this->buttonConfig['popupSelector.'])) {
                        $popupSelectorConfig = $this->buttonConfig['popupSelector.'];
                }
-               $target = $this->setTarget
-                       ? $this->setTarget
-                       : ($this->setClass || !$this->classesAnchorDefault[$this->act]
-                               ? ''
-                               : $this->classesAnchorDefaultTarget[$this->act]);
+               $target = $this->setTarget;
                $ltarget = '
                                <tr id="ltargetrow"' . ($targetSelectorConfig['disabled'] && $popupSelectorConfig['disabled'] ? ' style="display: none;"' : '') . '>
                                        <td><label>' . $GLOBALS['LANG']->getLL('target', TRUE) . ':</label></td>
index d89649c..4233070 100644 (file)
@@ -1899,6 +1899,28 @@ buttons.link.properties.target.default
 
 
 
+.. _buttons-link-type-properties-target-default:
+
+buttons.link.[ *type* ].properties.target.default
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container:: table-row
+
+   Property
+         buttons.link.[ *type* ].properties.target.default
+   
+   Data type
+         string
+   
+   Description
+         Specifies a default target for links of the given type.
+         Possible types are: page, file, url, mail, spec. More types may be
+         provided by extensions.
+         
+         Note: See also the classesAnchor configuration.
+
+
+
 .. _buttons-abbreviation-pages:
 
 buttons.abbreviation.pages
@@ -1917,11 +1939,6 @@ buttons.abbreviation.pages
          
          Note: If not set, the list of current webmounts is used.
          
-         Note: If no abbreviation records are found in the specified page id's, the
-         abbreviation button will not be present in the toolbar. If no abbreviation
-         records of type acronym or abreviation are found, the corresponding tab of the
-         abbreviation dialogue will not be enabled.
-         
          Note: In IE, before IE7, the abreviation tab of the abbreviation dialogue
          is never shown.
 
@@ -1975,6 +1992,27 @@ buttons.abbreviation.lockBeUserToDBmounts
 
 
 
+.. _buttons-abbreviation-removefieldsets:
+
+buttons.abbreviation.removeFieldsets
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container:: table-row
+
+   Property
+         buttons.abbreviation.removeFieldsets
+
+   Data type
+         list of strings
+
+   Description
+         List of fieldsets to remove from the abbreviation dialogue.
+         
+         Possible string values are: acronym, definedAcronym, abbreviation,
+         definedAbbreviation
+
+
+
 .. _buttons-acronym-pages:
 
 buttons.acronym.pages