Bug #18760 ยป rtehtmlarea_bugfix_8351.patch
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (working copy) | ||
---|---|---|
if (!$this->setClass && $this->classesAnchorDefault[$anchorType] == $class) {
|
||
$selected = 'selected="selected"';
|
||
}
|
||
$this->classesAnchorJSOptions[$anchorType] .= '<option ' . $selected . ' value="' .$class . '">' . $class . '</option>';
|
||
$classLabel = (is_array($RTEsetup['properties']['classes.']) && is_array($RTEsetup['properties']['classes.'][$class.'.']) && $RTEsetup['properties']['classes.'][$class.'.']['name']) ? $this->getPageConfigLabel($RTEsetup['properties']['classes.'][$class.'.']['name'], 0) : $class;
|
||
$classStyle = (is_array($RTEsetup['properties']['classes.']) && is_array($RTEsetup['properties']['classes.'][$class.'.']) && $RTEsetup['properties']['classes.'][$class.'.']['value']) ? $RTEsetup['properties']['classes.'][$class.'.']['value'] : '';
|
||
$this->classesAnchorJSOptions[$anchorType] .= '<option ' . $selected . ' value="' .$class . '"' . ($classStyle?' style="'.$classStyle.'"':'') . '>' . $classLabel . '</option>';
|
||
}
|
||
}
|
||
if ($this->classesAnchorJSOptions[$anchorType]) {
|
||
... | ... | |
return $code;
|
||
}
|
||
|
||
/**
|
||
* Localize a string using the language of the content element rather than the language of the BE interface
|
||
*
|
||
* @param string string: the label to be localized
|
||
* @return string Localized string.
|
||
*/
|
||
public function getLLContent($string) {
|
||
global $LANG;
|
||
... | ... | |
$LANG->charSet = $BE_charSet;
|
||
return $LLString;
|
||
}
|
||
|
||
/**
|
||
* Localize a label obtained from Page TSConfig
|
||
*
|
||
* @param string string: the label to be localized
|
||
* @return string Localized string.
|
||
*/
|
||
public function getPageConfigLabel($string,$JScharCode=1) {
|
||
global $LANG;
|
||
if (strcmp(substr($string,0,4),'LLL:')) {
|
||
$label = $string;
|
||
} else {
|
||
$label = $LANG->sL(trim($string));
|
||
}
|
||
$label = str_replace('"', '\"', str_replace('\\\'', '\'', $label));
|
||
$label = $JScharCode ? $LANG->JScharCode($label): $label;
|
||
return $label;
|
||
}
|
||
}
|
||
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_dam_browse_links.php (working copy) | ||
---|---|---|
if (!$this->setClass && $this->classesAnchorDefault[$anchorType] == $class) {
|
||
$selected = 'selected="selected"';
|
||
}
|
||
$this->classesAnchorJSOptions[$anchorType] .= '<option ' . $selected . ' value="' .$class . '">' . $class . '</option>';
|
||
$classLabel = (is_array($RTEsetup['properties']['classes.']) && is_array($RTEsetup['properties']['classes.'][$class.'.']) && $RTEsetup['properties']['classes.'][$class.'.']['name']) ? $this->getPageConfigLabel($RTEsetup['properties']['classes.'][$class.'.']['name'], 0) : $class;
|
||
$classStyle = (is_array($RTEsetup['properties']['classes.']) && is_array($RTEsetup['properties']['classes.'][$class.'.']) && $RTEsetup['properties']['classes.'][$class.'.']['value']) ? $RTEsetup['properties']['classes.'][$class.'.']['value'] : '';
|
||
$this->classesAnchorJSOptions[$anchorType] .= '<option ' . $selected . ' value="' .$class . '"' . ($classStyle?' style="'.$classStyle.'"':'') . '>' . $classLabel . '</option>';
|
||
}
|
||
}
|
||
if ($this->classesAnchorJSOptions[$anchorType]) {
|
||
... | ... | |
</td>
|
||
</tr>';
|
||
}
|
||
|
||
/**
|
||
* Localize a string using the language of the content element rather than the language of the BE interface
|
||
*
|
||
* @param string string: the label to be localized
|
||
* @return string Localized string.
|
||
*/
|
||
public function getLLContent($string) {
|
||
global $LANG;
|
||
... | ... | |
$LANG->charSet = $BE_charSet;
|
||
return $LLString;
|
||
}
|
||
|
||
/**
|
||
* Localize a label obtained from Page TSConfig
|
||
*
|
||
* @param string string: the label to be localized
|
||
* @return string Localized string.
|
||
*/
|
||
public function getPageConfigLabel($string,$JScharCode=1) {
|
||
global $LANG;
|
||
if (strcmp(substr($string,0,4),'LLL:')) {
|
||
$label = $string;
|
||
} else {
|
||
$label = $LANG->sL(trim($string));
|
||
}
|
||
$label = str_replace('"', '\"', str_replace('\\\'', '\'', $label));
|
||
$label = $JScharCode ? $LANG->JScharCode($label): $label;
|
||
return $label;
|
||
}
|
||
}
|
||