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

Commit

Permalink
render() for Button.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Feb 15, 2009
1 parent a3fbbf7 commit 18be504
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -761,9 +761,17 @@ MooEditable.UI.Separator = new Class({
MooEditable.UI.Button = new Class({

initialize: function(editor, action){
var self = this;
this.editor = editor;
this.action = action;
this.render();
},

toElement: function(){
return this.el;
},

render: function(){
var self = this;
var act = MooEditable.Actions[action];
this.el = new Element('button', {
'class': action + '-button toolbar-button ' + act.mode || self.editor.options.mode,
Expand All @@ -782,10 +790,8 @@ MooEditable.UI.Button = new Class({
mouseenter: function(e){ this.addClass('hover'); },
mouseleave: function(e){ this.removeClass('hover'); }
});
},

toElement: function(){
return this.el;

return this;
},

click: function(e){
Expand Down

0 comments on commit 18be504

Please sign in to comment.