Roo/bootstrap/Element.js
[roojs1] / Roo / bootstrap / Element.js
index 1301a78..bb4c9f0 100644 (file)
@@ -37,11 +37,31 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
             html: this.html
         }
         
-        
-       
         return cfg;
     },
     
+    initEvents: function() 
+    {
+        
+        Roo.bootstrap.Element.superclass.initEvents.call(this);
+        
+        this.el.on('click', this.onClick, this);
+        
+    },
+    
+    onClick : function(e)
+    {
+        if (this.disabled) {
+            return;
+        }
+        
+        if(this.preventDefault){
+            e.preventDefault();
+        }
+        
+        this.fireEvent('click', this, e);
+    },
+    
     getValue : function()
     {
         return this.el.dom.innerHTML;