Feature #22837 » 14658_v1.diff
typo3/class.browse_links.php (Arbeitskopie) | ||
---|---|---|
'target' => $currentLinkParts[1],
|
||
'class' => $currentLinkParts[2],
|
||
'title' => $currentLinkParts[3],
|
||
'params' => $currentLinkParts[4]
|
||
);
|
||
$this->curUrlArray = (is_array(t3lib_div::_GP('curUrl'))) ?
|
||
array_merge($initialCurUrlArray, t3lib_div::_GP('curUrl')) :
|
||
... | ... | |
// Initializing the title value (RTE)
|
||
$this->setTitle = ($this->curUrlArray['title'] != '-') ? $this->curUrlArray['title'] : '';
|
||
|
||
// Initializing the params value
|
||
$this->setParams = ($this->curUrlArray['params'] != '-') ? $this->curUrlArray['params'] : '';
|
||
// BEGIN accumulation of header JavaScript:
|
||
$JScode = '
|
||
... | ... | |
var cur_href="'.($this->curUrlArray['href']?$this->curUrlArray['href']:'').'";
|
||
var cur_target="'.($this->setTarget?$this->setTarget:'').'";
|
||
var cur_class = "'.($this->setClass ? $this->setClass : '-').'";
|
||
var cur_class = "' . ($this->setClass ? $this->setClass : '') . '";
|
||
var cur_title="'.($this->setTitle?$this->setTitle:'').'";
|
||
var cur_params="' . ($this->setParams ? $this->setParams : '') . '";
|
||
function browse_links_setTarget(target) { //
|
||
cur_target=target;
|
||
... | ... | |
cur_href=value;
|
||
add_href="&curUrl[href]="+value;
|
||
}
|
||
function browse_links_setParams(params) { //
|
||
cur_params=params;
|
||
add_params="&curUrl[params]="+escape(params);
|
||
}
|
||
';
|
||
if ($this->mode == 'wizard') { // Functions used, if the link selector is in wizard mode (= TCEforms fields)
|
||
... | ... | |
function updateValueInMainForm(input) { //
|
||
var field = checkReference();
|
||
if (field) {
|
||
if (cur_target == "" && (cur_title != "" || cur_class != "-")) {
|
||
if (cur_target == "" && (cur_class != "" || cur_title != "" || cur_params != "")) {
|
||
cur_target = "-";
|
||
}
|
||
if (cur_title == "" && cur_class == "-") {
|
||
cur_class = "";
|
||
if (cur_class == "" && (cur_title != "" || cur_params != "")) {
|
||
cur_class = "-";
|
||
}
|
||
cur_class = cur_class.replace(/[\'\"]/g, "");
|
||
if (cur_class.indexOf(" ") != -1) {
|
||
cur_class = "\"" + cur_class + "\"";
|
||
}
|
||
if (cur_title == "" && cur_params != "") {
|
||
cur_title = "-";
|
||
}
|
||
cur_title = cur_title.replace(/(^\")|(\"$)/g, "");
|
||
if (cur_title.indexOf(" ") != -1) {
|
||
cur_title = "\"" + cur_title + "\"";
|
||
}
|
||
input = input + " " + cur_target + " " + cur_class + " " + cur_title;
|
||
if (cur_params) {
|
||
cur_params = cur_params.replace(/\bid\=.*?(\&|$)/, "");
|
||
}
|
||
input = input + " " + cur_target + " " + cur_class + " " + cur_title + " " + cur_params;
|
||
field.value = input;
|
||
'.$update.'
|
||
}
|
||
... | ... | |
}
|
||
$content .= '
|
||
<!--
|
||
Selecting params for link:
|
||
-->
|
||
<form action="" name="lparamsform" id="lparamsform">
|
||
<table border="0" cellpadding="2" cellspacing="1" id="typo3-linkParams">
|
||
<tr>
|
||
<td style="width: 96px;">' . $GLOBALS['LANG']->getLL('params', 1) . '</td>
|
||
<td><input type="text" name="lparams" onchange="browse_links_setParams(this.value);" value="' . htmlspecialchars($this->setParams) . '"' . $this->doc->formWidth(10) . ' /></td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
<!--
|
||
Selecting class for link:
|
||
... | ... | |
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;
|
||
}
|
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
$linkClass = trim($link_paramA[2]); // Link class
|
||
if ($linkClass=='-') $linkClass = ''; // The '-' character means 'no class'. Necessary in order to specify a title as fourth parameter without setting the target or class!
|
||
$forceTarget = trim($link_paramA[1]); // Target value
|
||
if ($forceTarget=='-') {
|
||
$forceTarget = ''; // The '-' character means 'no target'. Necessary in order to specify a class as third parameter without setting the target!
|
||
}
|
||
$forceTitle = trim($link_paramA[3]); // Title value
|
||
if ($forceTarget=='-') $forceTarget = ''; // The '-' character means 'no target'. Necessary in order to specify a class as third parameter without setting the target!
|
||
if ($forceTitle=='-') {
|
||
$forceTitle = ''; // The '-' character means 'no title'. Necessary in order to specify further parameters without setting the title!
|
||
}
|
||
$forceParams = trim($link_paramA[4]); // params value
|
||
$conf['additionalParams'] .= $forceParams[0] == '&' ? $forceParams : '&' . $forceParams;
|
||
// Check, if the target is coded as a JS open window link:
|
||
$JSwindowParts = array();
|
||
$JSwindowParams = '';
|
typo3/sysext/lang/locallang_browse_links.xml (Arbeitskopie) | ||
---|---|---|
<label index="target">Target</label>
|
||
<label index="class">CSS-Class</label>
|
||
<label index="title">Title</label>
|
||
<label index="params">Additional link parameters</label>
|
||
<label index="target_popUpWindow">Open in window</label>
|
||
<label index="target_popUpWindow_width">Width</label>
|
||
<label index="target_popUpWindow_height">Height</label>
|