Project

General

Profile

Bug #20371 ยป rtehtmlarea_bugfix_11003_trunk.patch

Administrator Admin, 2009-04-28 21:58

View differences:

typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
$classSet = t3lib_div::trimExplode(',', $conf, 1);
$classList = implode(',', $classSet);
foreach ($classSet as $className) {
$classesArray['XOR'][$className] = '/^(' . implode('|', t3lib_div::trimExplode(',', t3lib_div::rmFromList($className, $classList), 1)) . ')$/i';
$classesArray['XOR'][$className] = '/^(' . implode('|', t3lib_div::trimExplode(',', t3lib_div::rmFromList($className, $classList), 1)) . ')$/';
}
}
}
......
/**
* Translate Page TS Config array in JS nested array definition
* Replace 0 values with false
* Unquote regular expression values
* Replace empty arrays with empty objects
*
* @param array $conf: Page TSConfig configuration array
*
* @return string nested JS array definition
*/
function buildNestedJSArray($conf) {
return str_replace(array(':"0"', ':"\/^(', ')$\/i"'), array(':false', ':/^(', ')$/i'), json_encode(t3lib_div::removeDotsFromTS($conf)));
return str_replace(array(':"0"', ':"\/^(', ')$\/i"', ':"\/^(', ')$\/"', '[]'), array(':false', ':/^(', ')$/i', ':/^(', ')$/', '{}'), json_encode(t3lib_div::removeDotsFromTS($conf)));
}
/**
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
*/
HTMLArea._addClass = function(el, addClassName) {
HTMLArea._removeClass(el, addClassName);
if (el.className && HTMLArea.classesXOR) {
if (el.className && HTMLArea.classesXOR && HTMLArea.classesXOR.hasOwnProperty(addClassName) && typeof(HTMLArea.classesXOR[addClassName].test) == "function") {
var classNames = el.className.trim().split(" ");
for (var i = classNames.length; --i >= 0;) {
if (HTMLArea.classesXOR[addClassName] && HTMLArea.classesXOR[addClassName].test(classNames[i])) {
if (HTMLArea.classesXOR[addClassName].test(classNames[i])) {
HTMLArea._removeClass(el, classNames[i]);
}
}
    (1-1/1)