Permalink
Browse files

patch: 2 if propertyIsEnumerable blocks added to make HTMLeditor work…

… with the prototype AJAX library
  • Loading branch information...
1 parent b985f62 commit d0fcd925f9dab9aa8a18d343f99882d6a1e8e0ec urs_hunkler committed May 3, 2006
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/editor/htmlarea/htmlarea.php
@@ -526,13 +526,15 @@ function createButton(txt) {
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 {
first = false;
}
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 @@ function createButton(txt) {
tb_cell.innerHTML = label;
} else {
createButton(code);
+ }
+ }
}
}
}

0 comments on commit d0fcd92

Please sign in to comment.