Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Remove active state when re-enabling buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Mar 3, 2009
1 parent 33788fe commit 39e713e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -782,6 +782,7 @@ MooEditable.UI.Button = new Class({
}
});

this.active = false;
this.disabled = false;

// add hover effect for IE
Expand All @@ -800,6 +801,7 @@ MooEditable.UI.Button = new Class({
},

enable: function(){
if (this.active) this.el.removeClass('onActive');
if (!this.disabled) return;
this.disabled = false;
this.el.removeClass('disabled').set('opacity', 1);
Expand All @@ -815,11 +817,13 @@ MooEditable.UI.Button = new Class({

activate: function(){
if (this.disabled) return;
this.active = true;
this.el.addClass('onActive');
return this;
},

deactivate: function(){
this.active = false;
this.el.removeClass('onActive');
return this;
}
Expand Down

0 comments on commit 39e713e

Please sign in to comment.