patch: 2 if propertyIsEnumerable blocks added to make HTMLeditor work with the prototype AJAX library

This commit is contained in:
urs_hunkler
2006-05-03 18:14:42 +00:00
parent b985f62858
commit d0fcd925f9
+4
View File
@@ -526,6 +526,7 @@ HTMLArea.prototype._createToolbar = function () {
var first = true;
for (var i in this.config.toolbar) {
if (this.config.toolbar.propertyIsEnumerable(i)) { // fix for prototype.js compatibility
if (!first) {
createButton("linebreak");
} else {
@@ -533,6 +534,7 @@ HTMLArea.prototype._createToolbar = function () {
}
var group = this.config.toolbar[i];
for (var j in group) {
if (group.propertyIsEnumerable(j)) { // fix for prototype.js compatibility
var code = group[j];
if (/^([IT])\[(.*?)\]/.test(code)) {
// special case, create text label
@@ -547,6 +549,8 @@ HTMLArea.prototype._createToolbar = function () {
tb_cell.innerHTML = label;
} else {
createButton(code);
}
}
}
}
}