[BUGFIX] RTE: External links not updated to internal by link dialogue
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 5 Sep 2011 15:10:59 +0000 (11:10 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 12 Sep 2011 22:44:27 +0000 (00:44 +0200)
Solution: Remove external attribute when switching to other type
of link.

Change-Id: I94762da2fe19cf2cf91f6af755234347aef942ab
Resolves: #29167
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/4773
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php

index f7f0c9f..e9f8460 100644 (file)
@@ -522,6 +522,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                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);
+                               browse_links_setAdditionalValue("external", "");
                                plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues);
                                return false;
                        }
@@ -531,6 +532,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                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);
+                               browse_links_setAdditionalValue("external", "");
                                plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues);
                                return false;
                        }
@@ -538,6 +540,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);
+                               browse_links_setAdditionalValue("external", "");
                                plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues);
                                return false;
                        }
@@ -683,7 +686,7 @@ class tx_rtehtmlarea_browse_links extends browse_links {
                                                        <tr>
                                                                <td>'.$LANG->getLL('emailAddress',1).':</td>
                                                                <td><input type="text" name="lemail"'.$this->doc->formWidth(20).' value="'.htmlspecialchars($this->curUrlInfo['act']=='mail'?$this->curUrlInfo['info']:'').'" /> '.
-                                                                       '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="browse_links_setTarget(\'\');browse_links_setHref(\'mailto:\'+document.lurlform.lemail.value); return link_current();" /></td>
+                                                                       '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="browse_links_setTarget(\'\');browse_links_setHref(\'mailto:\'+document.lurlform.lemail.value);browse_links_setAdditionalValue(\'external\', \'\');return link_current();" /></td>
                                                        </tr>
                                                </table>
                                        </form>';