/**
* @class Roo.bootstrap.Component
* @extends Roo.Component
+ * @abstract
+ * @children Roo.bootstrap.Component
* Bootstrap Component base class
* @cfg {String} cls css class
* @cfg {String} style any extra css
}
if (this.cls) {
- cfg.cls = (typeof(cfg.cls) == 'undefined') ? this.cls : cfg.cls + ' ' + this.cls;
+ cfg.cls = (typeof(cfg.cls) == 'undefined' ? this.cls : cfg.cls) + ' ' + this.cls;
}
if (this.style) { // fixme needs to support more complex style data.
- cfg.style = this.style;
+ cfg.style = (typeof(cfg.style) == 'undefined' ? this.style : cfg.style) + '; ' + this.style;
}
if(this.name){
{
return this.el;
},
+ getDocumentBody : function() // used by menus - as they are attached to the body so zIndexes work
+ {
+ return Roo.get(document.body);
+ },
+
/**
* Fetch the element to display the tooltip on.
* @return {Roo.Element} defaults to this.el
if (!skip_children) {
for(var i =0;i < items.length;i++) {
// Roo.log(['add child', items[i]]);
- nitems.push(cn.addxtype(Roo.apply({}, items[i])));
+ nitems.push(cn.addxtype(items[i].xns == false ? items[i] : Roo.apply({}, items[i])));
}
}
return cn;
},
+ /**
+ * Set the element that will be used to show or hide
+ */
+ setVisibilityEl : function(el)
+ {
+ this.visibilityEl = el;
+ },
+
+ /**
+ * Get the element that will be used to show or hide
+ */
getVisibilityEl : function()
{
-
if (typeof(this.visibilityEl) == 'object') {
- return this.visibilityEl.getEl();
+ return this.visibilityEl;
}
+
if (typeof(this.visibilityEl) == 'string') {
return this.visibilityEl == 'parent' ? this.parent().getEl() : this.getEl();
}
-
return this.getEl();
-
},
/**
return;
}
- this.getVisibilityEl().removeClass('hidden');
+ this.getVisibilityEl().removeClass(['hidden','d-none']);
+
+ this.fireEvent('show', this);
},
return;
}
- this.getVisibilityEl().addClass('hidden');
+ this.getVisibilityEl().addClass(['hidden','d-none']);
+
+ this.fireEvent('hide', this);
}
});