9 * @class Roo.bootstrap.Element
10 * @extends Roo.bootstrap.Component
11 * @children Roo.bootstrap.Component
12 * Bootstrap Element class (basically a DIV used to make random stuff )
14 * @cfg {String} html contents of the element
15 * @cfg {String} tag tag of the element
16 * @cfg {String} cls class of the element
17 * @cfg {Boolean} preventDefault (true|false) default false
18 * @cfg {Boolean} clickable (true|false) default false
19 * @cfg {String} role default blank - set to button to force cursor pointer
23 * Create a new Element
24 * @param {Object} config The config object
27 Roo.bootstrap.Element = function(config){
28 Roo.bootstrap.Element.superclass.constructor.call(this, config);
34 * When a element is chick
35 * @param {Roo.bootstrap.Element} this
36 * @param {Roo.EventObject} e
44 Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, {
49 preventDefault: false,
54 getAutoCreate : function(){
58 // cls: this.cls, double assign in parent class Component.js :: onRender
61 if (this.role !== false) {
68 initEvents: function()
70 Roo.bootstrap.Element.superclass.initEvents.call(this);
73 this.el.on('click', this.onClick, this);
81 if(this.preventDefault){
85 this.fireEvent('click', this, e); // why was this double click before?
95 return this.el.dom.innerHTML;
98 setValue : function(value)
100 this.el.dom.innerHTML = value;