add docblock for password
[roojs1] / Roo / bootstrap / Element.js
index 5756f64..4a4b58e 100644 (file)
@@ -8,12 +8,16 @@
 /**
  * @class Roo.bootstrap.Element
  * @extends Roo.bootstrap.Component
- * Bootstrap Element class
+ * @children Roo.bootstrap.Component
+ * Bootstrap Element class (basically a DIV used to make random stuff )
+ * 
  * @cfg {String} html contents of the element
  * @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
+ * @cfg {String} role default blank - set to button to force cursor pointer
  * 
  * @constructor
  * Create a new Element
@@ -45,6 +49,7 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
     preventDefault: false, 
     clickable: false,
     tapedTwice : false,
+    role : false,
     
     getAutoCreate : function(){
         
@@ -53,6 +58,9 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
             // cls: this.cls, double assign in parent class Component.js :: onRender
             html: this.html
         };
+        if (this.role !== false) {
+            cfg.role = this.role;
+        }
         
         return cfg;
     },
@@ -74,7 +82,7 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
             e.preventDefault();
         }
         
-        this.fireEvent('dblclick', this, e);
+        this.fireEvent('click', this, e); // why was this double click before?
     },