* @cfg {Boolean} jumbotron is it a jumbotron element
* @cfg {String} html content of element
* @cfg {String} well (lg|sm|md) a well, large, small or medium.
- * @cfg {String} panel (primary|success|info|warning|danger) render as a panel.
+ * @cfg {String} panel (default|primary|success|info|warning|danger) render as panel - type - primary/success.....
* @cfg {String} header content of header (for panel)
* @cfg {String} footer content of footer (for panel)
* @cfg {String} sticky (footer|wrap|push) block to use as footer or body- needs css-bootstrap/sticky-footer.css
* @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
/**
* @event click
* When a element is chick
- * @param {Roo.bootstrap.Element} this
+ * @param {Roo.bootstrap.Container} this
* @param {Roo.EventObject} e
*/
"click" : true
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);
+ }
},
return this.el.select('.panel-heading',true).first()
},
+ bodyEl : function()
+ {
+ if(!this.el || !this.panel.length){
+ return;
+ }
+
+ return this.el.select('.panel-body',true).first()
+ },
+
titleEl : function()
{
if(!this.el || !this.panel.length || !this.header.length){
}
t.dom.innerHTML = v;
+ },
+
+ onClick : function(e)
+ {
+ e.preventDefault();
+
+ this.fireEvent('click', this, e);
}
-
});
\ No newline at end of file