Roo/bootstrap/Button.js
[roojs1] / Roo / bootstrap / Button.js
index 47f432a..a7c33aa 100644 (file)
@@ -79,7 +79,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     
     
     pressed : null,
-    
+     
     
     getAutoCreate : function(){
         
@@ -270,7 +270,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             this.el.select('.roo-button').on('click', this.onClick, this);
        }
        
-       
+       this.el.enableDisplayMode();
         
     },
     onClick : function(e)
@@ -292,11 +292,19 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
         
         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;
@@ -319,10 +327,22 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
        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