Bug #19670 » rtehtmlarea_bugfix_9878_trunk.patch
typo3/sysext/rtehtmlarea/extensions/BlockElements/class.tx_rtehtmlarea_blockelements.php (copie de travail) | ||
---|---|---|
if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.']['formatblock.']) || !$this->thisConfig['buttons.']['formatblock.']['orderItems']) {
|
||
asort($blockElementsOptions);
|
||
}
|
||
// utf8-encode labels if we are responding to an IRRE ajax call
|
||
if (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) {
|
||
foreach ($blockElementsOptions as $item => $label) {
|
||
$blockElementsOptions[$item] = $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet);
|
||
}
|
||
}
|
||
// Generating the javascript options
|
||
$JSBlockElements = '{
|
||
"'. $first.'" : "none"';
|
typo3/sysext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php (copie de travail) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* (c) 2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the Typo3 project. The Typo3 project is
|
||
... | ... | |
/**
|
||
* Default Font plugin for htmlArea RTE
|
||
*
|
||
* @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* @author Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
*
|
||
* TYPO3 SVN ID: $Id$
|
||
*
|
||
... | ... | |
$configureRTEInJavascriptString = '';
|
||
// Builing JS array of default font faces
|
||
// utf8-encode labels if we are responding to an IRRE ajax call
|
||
$HTMLAreaFontname = array();
|
||
$HTMLAreaFontname['nofont'] = '
|
||
"' . $fontName . '" : "' . $this->htmlAreaRTE->cleanList($fontValue) . '"';
|
||
$defaultFontFacesList = 'nofont,';
|
||
if ($this->htmlAreaRTE->is_FE()) {
|
||
$HTMLAreaFontname['nofont'] = '
|
||
"' . $TSFE->getLLL('No font', $this->LOCAL_LANG) . '" : ""';
|
||
"' . $GLOBALS['TSFE']->getLLL('No font', $this->LOCAL_LANG) . '" : ""';
|
||
} else {
|
||
$HTMLAreaFontname['nofont'] = '
|
||
"' . $LANG->getLL('No font') . '" : ""';
|
||
"' . ($this->htmlAreaRTE->TCEform->inline->isAjaxCall ? $GLOBALS['LANG']->csConvObj->utf8_encode($GLOBALS['LANG']->getLL('No font'), $GLOBALS['LANG']->charSet) : $GLOBALS['LANG']->getLL('No font')) . '" : ""';
|
||
}
|
||
$hideFontFaces = $this->htmlAreaRTE->cleanList($this->thisConfig['hideFontFaces']);
|
||
... | ... | |
foreach ($this->defaultFontFaces as $fontName => $fontValue) {
|
||
if (!t3lib_div::inList($hideFontFaces, $index+1)) {
|
||
$HTMLAreaFontname[$fontName] = '
|
||
"' . $fontName . '" : "' . $this->htmlAreaRTE->cleanList($fontValue) . '"';
|
||
"' . ((!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) ? $GLOBALS['LANG']->csConvObj->utf8_encode($fontName, $GLOBALS['LANG']->charSet) : $fontName) . '" : "' . $this->htmlAreaRTE->cleanList($fontValue) . '"';
|
||
$defaultFontFacesList .= $fontName . ',';
|
||
}
|
||
$index++;
|
||
... | ... | |
$fontName = substr($fontName,0,-1);
|
||
$fontLabel = $this->htmlAreaRTE->getPageConfigLabel($conf['name'],0);
|
||
$HTMLAreaFontname[$fontName] = '
|
||
"' . $fontLabel . '" : "' . $this->htmlAreaRTE->cleanList($conf['value']) . '"';
|
||
"' . ((!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) ? $GLOBALS['LANG']->csConvObj->utf8_encode($fontLabel, $GLOBALS['LANG']->charSet) : $fontLabel) . '" : "' . $this->htmlAreaRTE->cleanList($conf['value']) . '"';
|
||
}
|
||
}
|
||
... | ... | |
$HTMLAreaJSFontSize = '{';
|
||
if ($this->htmlAreaRTE->cleanList($this->thisConfig['hideFontSizes']) != '*') {
|
||
// utf8-encode labels if we are responding to an IRRE ajax call
|
||
if (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) {
|
||
foreach ($HTMLAreaFontSizes as $FontSizeItem => $FontSizeLabel) {
|
||
$HTMLAreaFontSizes[$FontSizeItem] = $GLOBALS['LANG']->csConvObj->utf8_encode($FontSizeLabel, $GLOBALS['LANG']->charSet);
|
||
}
|
||
}
|
||
$HTMLAreaFontSizeIndex = 0;
|
||
foreach ($HTMLAreaFontSizes as $FontSizeItem => $FontSizeLabel) {
|
||
if($HTMLAreaFontSizeIndex) {
|
||
... | ... | |
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultFont/class.tx_rtehtmlarea_defaultfont.php']);
|
||
}
|
||
?>
|
||
?>
|
typo3/sysext/rtehtmlarea/extensions/InlineElements/class.tx_rtehtmlarea_inlineelements.php (copie de travail) | ||
---|---|---|
if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.']['formattext.']) || !$this->thisConfig['buttons.']['formattext.']['orderItems']) {
|
||
asort($inlineElementsOptions);
|
||
}
|
||
// utf8-encode labels if we are responding to an IRRE ajax call
|
||
if (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) {
|
||
foreach ($inlineElementsOptions as $item => $label) {
|
||
$inlineElementsOptions[$item] = $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet);
|
||
}
|
||
}
|
||
// Generating the javascript options
|
||
$JSInlineElements = '{
|
||
"'. $first.'" : "none"';
|
typo3/sysext/rtehtmlarea/extensions/SelectFont/class.tx_rtehtmlarea_selectfont.php (copie de travail) | ||
---|---|---|
"' . $GLOBALS['TSFE']->getLLL((($buttonId == 'fontstyle') ? 'No font' : 'No size'), $this->LOCAL_LANG) . '" : ""';
|
||
} else {
|
||
$items['none'] = '
|
||
"' . $GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'No font' : 'No size') . '" : ""';
|
||
"' . ($this->htmlAreaRTE->TCEform->inline->isAjaxCall
|
||
? $GLOBALS['LANG']->csConvObj->utf8_encode($GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'No font' : 'No size'), $GLOBALS['LANG']->charSet)
|
||
: $GLOBALS['LANG']->getLL(($buttonId == 'fontstyle') ? 'No font' : 'No size')) . '" : ""';
|
||
}
|
||
$defaultItems = 'none,';
|
||
... | ... | |
$label = $GLOBALS['TSFE']->getLLL($name,$this->LOCAL_LANG);
|
||
} else {
|
||
$label = $GLOBALS['LANG']->getLL($name);
|
||
$label = $this->htmlAreaRTE->TCEform->inline->isAjaxCall ? $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet) : $label;
|
||
}
|
||
$items[$name] = '
|
||
"' . $name . '" : "' . $this->htmlAreaRTE->cleanList($value) . '"';
|
||
"' . $label . '" : "' . $this->htmlAreaRTE->cleanList($value) . '"';
|
||
$defaultItems .= $name . ',';
|
||
}
|
||
$index++;
|
||
... | ... | |
foreach ($this->RTEProperties[($buttonId == 'fontstyle') ? 'fonts.' : 'fontSizes.'] as $name => $conf) {
|
||
$name = substr($name,0,-1);
|
||
$label = $this->htmlAreaRTE->getPageConfigLabel($conf['name'],0);
|
||
$label = (!$this->htmlAreaRTE->is_FE() && $this->htmlAreaRTE->TCEform->inline->isAjaxCall) ? $GLOBALS['LANG']->csConvObj->utf8_encode($label, $GLOBALS['LANG']->charSet) : $label;
|
||
$items[$name] = '
|
||
"' . $label . '" : "' . $this->htmlAreaRTE->cleanList($conf['value']) . '"';
|
||
}
|