Skip to content

Commit

Permalink
Disabling select correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
1602 committed Mar 26, 2010
1 parent a790f5e commit de3c3ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wysiwyg.core.js
Expand Up @@ -286,8 +286,15 @@ Wysiwyg.prototype = {
if (source_mode) {
if (p.command === 'show_source' || p.anchorClass === 'bb-fullscreen') {
self.$.remove_class(bel, 'disabled');
if (bel.lastChild.nodeName == 'SELECT') {
bel.lastChild.disabled = false;
}
} else {
self.$.add_class(bel, 'disabled');
if (bel.lastChild.nodeName == 'SELECT') {
console.log(bel.lastChild.nodeName);
bel.lastChild.disabled = true;
}
}
self.$.remove_class(bel, 'click');
continue;
Expand Down
4 changes: 4 additions & 0 deletions wysiwyg.plugins.js
Expand Up @@ -86,6 +86,10 @@ Wysiwyg.prototype.plugins.fontsize = function (w) {
}
w.win.focus();
};
this.update = function (button) {
w.$.remove_class(button, 'disabled');
button.lastChild.disabled = false;
};
this.init = function (element_holder) {
self.el = element_holder.lastChild;
w.$.add_event(self.el, 'change', function () {
Expand Down

0 comments on commit de3c3ce

Please sign in to comment.