* @cfg {Boolean} loadOnce When used with {@link #url}, calls {@link #setUrl} with this value
* @cfg {String} content Raw content to fill content panel with (uses setContent on construction.)
* @cfg {Boolean} badges render the badges
+ * @cfg {String} cls extra classes to use
+ * @cfg {String} background (primary|secondary|success|info|warning|danger|light|dark)
* @constructor
* Create a new ContentPanel.
this.el = Roo.DomHelper.append(document.body,
config.autoCreate, true);
}else{
- var elcfg = { tag: "div",
- cls: "roo-layout-inactive-content",
- id: config.id||el
- };
+ var elcfg = {
+ tag: "div",
+ cls: "roo-layout-inactive-content",
+ id: config.id||el
+ };
if (config.html) {
elcfg.html = config.html;
this.active = active;
this.setActiveClass(active);
if(!active){
- this.fireEvent("deactivate", this);
- }else{
- this.fireEvent("activate", this);
+ if(this.fireEvent("deactivate", this) === false){
+ return false;
+ }
+ return true;
}
+ this.fireEvent("activate", this);
+ return true;
},
/**
* Updates this panel's element
}
if(this.toolbar){
var te = this.toolbar.getEl();
- height -= te.getHeight();
te.setWidth(width);
+ height -= te.getHeight();
}
if(this.footer){
var te = this.footer.getEl();
- Roo.log("footer:" + te.getHeight());
-
- height -= te.getHeight();
te.setWidth(width);
+ height -= te.getHeight();
}
* @return {String}
*/
getTitle : function(){
- return this.title;
+
+ if (typeof(this.title) != 'object') {
+ return this.title;
+ }
+
+ var t = '';
+ for (var k in this.title) {
+ if (!this.title.hasOwnProperty(k)) {
+ continue;
+ }
+
+ if (k.indexOf('-') >= 0) {
+ var s = k.split('-');
+ for (var i = 0; i<s.length; i++) {
+ t += "<span class='visible-"+s[i]+"'>"+this.title[k]+"</span>";
+ }
+ } else {
+ t += "<span class='visible-"+k+"'>"+this.title[k]+"</span>";
+ }
+ }
+ return t;
},
/**
* @param {String} title
*/
setTitle : function(title){
- title = 'testing';
this.title = title;
if(this.region){
this.region.updatePanelTitle(this, title);