* @cfg {Boolean} expandable (true|false) default false
* @cfg {Boolean} expanded (true|false) default true
* @cfg {String} rheader contet on the right of header
+ * @cfg {Boolean} clickable (true|false) default false
*
* @constructor
*
* @param {Roo.bootstrap.Container} this
*/
- "collapse" : true
+ "collapse" : true,
+ /**
+ * @event click
+ * When a element is chick
+ * @param {Roo.bootstrap.Container} this
+ * @param {Roo.EventObject} e
+ */
+ "click" : true
});
};
expandable : false,
rheader : '',
expanded : true,
+ clickable: false,
getChildContainer : function() {
initEvents: function()
{
- if(!this.expandable){
- return;
- }
-
- var headerEl = this.headerEl();
+ if(this.expandable){
+ var headerEl = this.headerEl();
- if(!headerEl){
- return;
+ if(headerEl){
+ headerEl.on('click', this.onToggleClick, this);
+ }
}
- headerEl.on('click', this.onToggleClick, this);
+ if(this.clickable){
+ this.el.on('click', this.onClick, this);
+ }
},
}
t.dom.innerHTML = v;
+ },
+
+ onClick : function(e)
+ {
+ e.preventDefault();
+
+ this.fireEvent('click', this, e);
}
});