Added feature #14094: htmlArea RTE: Optionally add rel attribute to link dialogue
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 13 Apr 2010 16:47:02 +0000 (16:47 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 13 Apr 2010 16:47:02 +0000 (16:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7345 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/ext_localconf.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod3/locallang.xml

index d6226a1..7f92a7c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
        * Follow-up to feature #14051: htmlArea RTE: Streamline the RTE loading process
        * Fixed bug #14085: htmlArea RTE: Setting empty color raises js error in IE
        * Fixed bug #14086: htmlArea RTE: Small css glitch in the color setting dialogue
+       * Added feature #14094: htmlArea RTE: Optionally add rel attribute to link dialogue
 
 2010-04-13  Steffen Kamper  <info@sk-typo3.de>
 
index c27e8cf..7e38879 100644 (file)
@@ -3,6 +3,7 @@
        * Follow-up to feature #14051: htmlArea RTE: Streamline the RTE loading process
        * Fixed bug #14085: htmlArea RTE: Setting empty color raises js error in IE
        * Fixed bug #14086: htmlArea RTE: Small css glitch in the color setting dialogue
+       * Added feature #14094: htmlArea RTE: Optionally add rel attribute to link dialogue
 
 2010-04-12  Stanislas Rolland  <typo3@sjbr.ca>
 
index 888fc5c..e833721 100644 (file)
@@ -176,6 +176,7 @@ $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link'] = array();
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php:&tx_rtehtmlarea_typo3link';
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['addIconsToSkin'] = 0;
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['disableInFE'] = 1;
+$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['TYPO3Link']['additionalAttributes'] = 'rel';
        // Add default Page TSonfig RTE configuration for enabling links accessibility icons
 $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableAccessibilityIcons'] = $_EXTCONF['enableAccessibilityIcons'] ? $_EXTCONF['enableAccessibilityIcons'] : 0;
 if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableAccessibilityIcons']) {
index 5db6f00..97e7406 100644 (file)
@@ -514,6 +514,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                if (document.ltargetform.anchor_title) browse_links_setTitle(document.ltargetform.anchor_title.value);
                                if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value);
                                if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value);
+                               if (document.ltargetform.lrel) browse_links_setAdditionalValue("rel", document.ltargetform.lrel.value);
                                plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues);
                                return false;
                        }
@@ -522,6 +523,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                if (document.ltargetform.anchor_title) browse_links_setTitle(document.ltargetform.anchor_title.value);
                                if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value);
                                if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value);
+                               if (document.ltargetform.lrel) browse_links_setAdditionalValue("rel", document.ltargetform.lrel.value);
                                plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues);
                                return false;
                        }
@@ -537,6 +539,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                if (document.ltargetform.anchor_title) browse_links_setTitle(document.ltargetform.anchor_title.value);
                                if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value);
                                if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value);
+                               if (document.ltargetform.lrel) browse_links_setAdditionalValue("rel", document.ltargetform.lrel.value);
                                if (cur_href!="http://" && cur_href!="mailto:") {
                                        plugin.createLink(cur_href + parameters,cur_target,cur_class,cur_title,additionalValues);
                                }
@@ -848,8 +851,9 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                $ltarget = $this->addTargetSelector();
                $lclass = $this->addClassSelector();
                $ltitle = $this->addTitleSelector();
-               if ($lpageId || $queryParameters || $ltarget || $lclass || $ltitle) {
-                       $ltargetForm = $this->wrapInForm($lpageId.$queryParameters.$ltarget.$lclass.$ltitle);
+               $rel = $this->addRelField();
+               if ($lpageId || $queryParameters || $ltarget || $lclass || $ltitle || $rel) {
+                       $ltargetForm = $this->wrapInForm($lpageId.$queryParameters.$ltarget.$lclass.$ltitle.$rel);
                }
                return $ltargetForm;
        }
@@ -891,6 +895,16 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                                </tr>':'';
        }
 
+       function addRelField() {
+               return (($this->act == 'page' || $this->act == 'url' || $this->act == 'file') && $this->buttonConfig && is_array($this->buttonConfig['relAttribute.']) && $this->buttonConfig['relAttribute.']['enabled'])?'
+                                               <tr>
+                                                       <td>'.$GLOBALS['LANG']->getLL('linkRelationship',1).':</td>
+                                                       <td colspan="3">
+                                                               <input type="text" name="lrel" value="' . $this->additionalAttributes['rel']. '"  ' . $this->doc->formWidth(30) . ' />
+                                                       </td>
+                                               </tr>':'';
+       }
+
        function addQueryParametersSelector() {
                global $LANG;
 
index 16fad6e..d86e7e4 100644 (file)
@@ -18,6 +18,7 @@
                        <label index="folderTree">Folder Tree</label>
                        <label index="files">Files</label>
                        <label index="target">Target</label>
+                       <label index="linkRelationship">Relationship</label>
                        <label index="target_popUpWindow">Open in window</label>
                        <label index="target_popUpWindow_width">Width</label>
                        <label index="target_popUpWindow_height">Height</label>