pressed : null,
-
+
getAutoCreate : function(){
} else {
cfg.tag = this.tag;
}
- cfg.html = this.html || cfg.html;
+ cfg.html = '<span class="roo-button-text">' + (this.html || cfg.html) + '</span>';
if (this.toggle == true) {
cfg={
this.el.select('.roo-button').on('click', this.onClick, this);
}
-
+ this.el.enableDisplayMode();
},
onClick : function(e)
this.fireEvent('click', this, e);
},
+
+ /**
+ * Enables this button
+ */
enable : function()
{
this.disabled = false;
this.el.removeClass('disabled');
},
+
+ /**
+ * Disable this button
+ */
disable : function()
{
this.disabled = true;
setActive : function(v) {
this.el[v ? 'addClass' : 'removeClass']('active');
-
-
},
/**
- * If a state it passed, it becomes the pressed state otherwise the current state is toggled.
- * @param {Boolean} state (optional) Force a particular state
+ * toggles the current active state
*/
toggleActive : function()
{
this.setActive(!active);
+ },
+ setText : function(str)
+ {
+ this.el.select('.roo-button-text',true).first().dom.innerHTML = str;
+ },
+ hide: function() {
+
+
+ this.el.hide();
+ },
+ show: function() {
+
+ this.el.show();
}
-
});
\ No newline at end of file