Permalink
Browse files

patch for prototype compatibility

  • Loading branch information...
urs_hunkler
urs_hunkler committed May 14, 2006
1 parent 569936a commit 9bc5c7f85ee20d4363ee1800fc7889f494918fe9
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/editor/htmlarea.php
View
@@ -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 9bc5c7f

Please sign in to comment.