Index: typo3/class.browse_links.php
===================================================================
--- typo3/class.browse_links.php (Revision 5914)
+++ typo3/class.browse_links.php (Arbeitskopie)
@@ -887,19 +887,19 @@
var cur_class = "'.($this->setClass ? $this->setClass : '-').'";
var cur_title="'.($this->setTitle?$this->setTitle:'').'";
- function browse_links_setTarget(target) { //
- cur_target=target;
- add_target="&curUrl[target]="+escape(target);
+ function setTarget(value) {
+ cur_target=value;
+ add_target="&curUrl[target]="+encodeURIComponent(value);
}
- function browse_links_setClass(cssClass) { //
- cur_class = cssClass;
- add_class = "&curUrl[class]=" + escape(cssClass);
+ function setClass(value) {
+ cur_class=value;
+ add_class="&curUrl[class]="+encodeURIComponent(value);
}
- function browse_links_setTitle(title) { //
- cur_title=title;
- add_title="&curUrl[title]="+escape(title);
+ function setTitle(value) {
+ cur_title=value;
+ add_title="&curUrl[title]="+encodeURIComponent(value);
}
- function browse_links_setValue(value) { //
+ function setValue(value) {
cur_href=value;
add_href="&curUrl[href]="+value;
}
@@ -976,23 +976,35 @@
';
} else { // Functions used, if the link selector is in RTE mode:
$JScode.='
- function link_typo3Page(id,anchor) { //
+ function link_typo3Page(id,anchor) {
var theLink = \''.$this->siteURL.'?id=\'+id+(anchor?anchor:"");
- self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title);
+ if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
+ if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
+ if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
+ plugin.createLink(theLink,cur_target,cur_class,cur_title);
return false;
}
function link_folder(folder) { //
var theLink = \''.$this->siteURL.'\'+folder;
- self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title);
+ if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
+ if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
+ if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
+ plugin.createLink(theLink,cur_target,cur_class,cur_title);
return false;
}
function link_spec(theLink) { //
- self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title);
+ if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
+ if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
+ if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
+ plugin.createLink(theLink,cur_target,cur_class,cur_title);
return false;
}
function link_current() { //
+ if (document.ltargetform.anchor_title) setTitle(document.ltargetform.anchor_title.value);
+ if (document.ltargetform.anchor_class) setClass(document.ltargetform.anchor_class.value);
+ if (document.ltargetform.ltarget) setTarget(document.ltargetform.ltarget.value);
if (cur_href!="http://" && cur_href!="mailto:") {
- self.parent.parent.renderPopup_addLink(cur_href, cur_target, cur_class, cur_title);
+ plugin.createLink(cur_href,cur_target,cur_class,cur_title);
}
return false;
}
@@ -1219,7 +1231,7 @@
$menuDef['removeLink']['isActive'] = $this->act=='removeLink';
$menuDef['removeLink']['label'] = $LANG->getLL('removeLink',1);
$menuDef['removeLink']['url'] = '#';
- $menuDef['removeLink']['addParams'] = 'onclick="self.parent.parent.renderPopup_unLink();return false;"';
+ $menuDef['removeLink']['addParams'] = 'onclick="plugin.unLink();return false;"';
}
if (in_array('page',$allowedItems)) {
$menuDef['page']['isActive'] = $this->act=='page';
@@ -1281,7 +1293,7 @@
' . $GLOBALS['LANG']->getLL('emailAddress', 1) . ': |
doc->formWidth(20).' value="'.htmlspecialchars($this->curUrlInfo['act']=='mail'?$this->curUrlInfo['info']:'').'" /> '.
- ' |
+ '
';
@@ -1298,7 +1310,7 @@
URL: |
doc->formWidth(30).' value="'.htmlspecialchars($this->curUrlInfo['act']=='url'?$this->curUrlInfo['info']:'http://').'" /> '.
- ' |
+ '
';
@@ -1363,7 +1375,7 @@
// URL + onclick event:
$onClickEvent='';
- if (isset($v[$k2i.'.']['target'])) $onClickEvent.="browse_links_setTarget('".$v[$k2i.'.']['target']."');";
+ if (isset($v[$k2i.'.']['target'])) $onClickEvent.="setTarget('".$v[$k2i.'.']['target']."');";
$v[$k2i.'.']['url'] = str_replace('###_URL###',$this->siteURL,$v[$k2i.'.']['url']);
if (substr($v[$k2i.'.']['url'],0,7)=='http://' || substr($v[$k2i.'.']['url'],0,7)=='mailto:') {
$onClickEvent.="cur_href=unescape('".rawurlencode($v[$k2i.'.']['url'])."');link_current();";
@@ -1435,7 +1447,7 @@
@@ -1447,7 +1459,7 @@
@@ -1466,9 +1478,9 @@