+2008-05-07 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Fixed bug #8351: RTE.classes configuration not honoured by htmlArea RTE Insert/modify link class selector
+
2008-05-06 Dmitry Dulepov <dmitry@typo3.org>
* Fixed bug #8330: Missing padding in select lists without icons (thanks to Uschi Renziehausen)
+2008-05-07 Stanislas Rolland <typo3@sjbr.ca>
+
+ * Fixed bug #8351: RTE.classes configuration not honoured by htmlArea RTE Insert/modify link class selector
+
2008-04-26 Stanislas Rolland <typo3@sjbr.ca>
* Fixed bug #8254: htmlArea RTE sets invalid link to file selected using DAM media browser. Thanks to Xavier Perseguers.
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;
+ }
}
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;
+ }
}