Project

General

Profile

Feature #18518 » patch_0007963.diff

Administrator Admin, 2008-11-29 22:07

View differences:

typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js (working copy)
// for ie not relevant. returns allways one element
cssElements = selectorText.split(",");
for (var k = 0; k < cssElements.length; k++) {
cssElement = cssElements[k].split(".");
tagName = cssElement[0].toLowerCase().trim();
if (!tagName) {
tagName = 'all';
}
className = cssElement[1];
if (className && !HTMLArea.reservedClassNames.test(className)) {
if (((tagName != "all") && (!this.tags || !this.tags[tagName]))
|| ((tagName == "all") && (!this.tags || !this.tags[tagName]) && this.showTagFreeClasses)
|| (this.tags && this.tags[tagName] && this.tags[tagName].allowedClasses && this.tags[tagName].allowedClasses.test(className))) {
// Match ALL classes (<element name (optional)>.<class name>) in selector rule
var s = cssElements[k],
pattern = /(\S*)\.(\S+)/,
index;
while ((index = s.search(pattern)) > -1) {
var match = pattern.exec(s.substring(index));
s = s.substring(index+match[0].length);
tagName = (match[1] && (match[1] != '*')) ? match[1].toLowerCase().trim() : "all";
className = match[2];
if (className && !HTMLArea.reservedClassNames.test(className)) {
if (((tagName != "all") && (!this.tags || !this.tags[tagName]))
|| ((tagName == "all") && (!this.tags || !this.tags[tagName]) && this.showTagFreeClasses)
|| (this.tags && this.tags[tagName] && this.tags[tagName].allowedClasses && this.tags[tagName].allowedClasses.test(className))) {
if (!newCssArray[tagName]) {
newCssArray[tagName] = new Object();
}
......
cssName = this.localize("Element style");
}
newCssArray[tagName][className] = cssName;
}
}
}
}
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js (working copy)
// for ie not relevant. returns allways one element
cssElements = selectorText.split(",");
for (var k = 0; k < cssElements.length; k++) {
cssElement = cssElements[k].split(".");
tagName = cssElement[0].toLowerCase().trim();
if (!tagName) {
tagName = "all";
}
className = cssElement[1];
if (className && !HTMLArea.reservedClassNames.test(className)) {
if (((tagName != "all") && (!this.tags || !this.tags[tagName]))
|| ((tagName == "all") && (!this.tags || !this.tags[tagName]) && this.showTagFreeClasses)
|| (this.tags && this.tags[tagName] && this.tags[tagName].allowedClasses && this.tags[tagName].allowedClasses.test(className))) {
// Match ALL classes (<element name (optional)>.<class name>) in selector rule
var s = cssElements[k],
pattern = /(\S*)\.(\S+)/,
index;
while ((index = s.search(pattern)) > -1) {
var match = pattern.exec(s.substring(index));
s = s.substring(index+match[0].length);
tagName = (match[1] && (match[1] != '*')) ? match[1].toLowerCase().trim() : "all";
className = match[2];
if (className && !HTMLArea.reservedClassNames.test(className)) {
if (((tagName != "all") && (!this.tags || !this.tags[tagName]))
|| ((tagName == "all") && (!this.tags || !this.tags[tagName]) && this.showTagFreeClasses)
|| (this.tags && this.tags[tagName] && this.tags[tagName].allowedClasses && this.tags[tagName].allowedClasses.test(className))) {
if (!newCssArray[tagName]) {
newCssArray[tagName] = new Object();
}
......
cssName = this.localize("Element style");
}
newCssArray[tagName][className] = cssName;
}
}
}
}
(2-2/2)