Fix #6673 - mobile cards issues
[roojs1] / Roo / bootstrap / Element.js
index 085b068..5756f64 100644 (file)
@@ -13,6 +13,7 @@
  * @cfg {String} tag tag of the element
  * @cfg {String} cls class of the element
  * @cfg {Boolean} preventDefault (true|false) default false
+ * @cfg {Boolean} clickable (true|false) default false
  * 
  * @constructor
  * Create a new Element
@@ -30,7 +31,9 @@ Roo.bootstrap.Element = function(config){
          * @param {Roo.bootstrap.Element} this
          * @param {Roo.EventObject} e
          */
-        "click" : true
+        "click" : true 
+        
+      
     });
 };
 
@@ -40,24 +43,28 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
     cls: '',
     html: '',
     preventDefault: false, 
+    clickable: false,
+    tapedTwice : false,
     
     getAutoCreate : function(){
         
         var cfg = {
             tag: this.tag,
-            cls: this.cls,
+            // cls: this.cls, double assign in parent class Component.js :: onRender
             html: this.html
-        }
+        };
         
         return cfg;
     },
     
     initEvents: function() 
     {
-        
         Roo.bootstrap.Element.superclass.initEvents.call(this);
         
-        this.el.on('click', this.onClick, this);
+        if(this.clickable){
+            this.el.on('click', this.onClick, this);
+        }
+        
         
     },
     
@@ -67,9 +74,14 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
             e.preventDefault();
         }
         
-        this.fireEvent('click', this, e);
+        this.fireEvent('dblclick', this, e);
     },
     
+    
+    
+
+    
+    
     getValue : function()
     {
         return this.el.dom.innerHTML;