/**
- * @class Roo.boostrap.panel.Nest
- * @extends Roo.ContentPanel
+ * @class Roo.bootstrap.panel.Nest
+ * @extends Roo.bootstrap.panel.Content
* @constructor
- * Create a new NestedLayoutPanel.
+ * Create a new Panel, that can contain a layout.Border.
*
*
- * @param {Roo.BorderLayout} layout The layout for this panel
* @param {String/Object} config A string to set only the title or a config object
*/
-Roo.NestedLayoutPanel = function(layout, config)
+Roo.bootstrap.panel.Nest = function(config)
{
// construct with only one argument..
/* FIXME - implement nicer consturctors
}
*/
+ config.el = config.layout.getEl();
- Roo.NestedLayoutPanel.superclass.constructor.call(this, layout.getEl(), config);
+ Roo.bootstrap.panel.Nest.superclass.constructor.call(this, config);
- layout.monitorWindowResize = false; // turn off autosizing
- this.layout = layout;
- this.layout.getEl().addClass("x-layout-nested-layout");
+ config.layout.monitorWindowResize = false; // turn off autosizing
+ this.layout = config.layout;
+ this.layout.getEl().addClass("roo-layout-nested-layout");
+ this.layout.parent = this;
};
-Roo.extend(Roo.NestedLayoutPanel, Roo.ContentPanel, {
+Roo.extend(Roo.bootstrap.panel.Nest, Roo.bootstrap.panel.Content, {
+ /**
+ * @cfg {Roo.BorderLayout} layout The layout for this panel
+ */
+ layout : false,
setSize : function(width, height){
if(!this.ignoreResize(width, height)){
var size = this.adjustForComponents(width, height);
var el = this.layout.getEl();
- el.setSize(size.width, size.height);
+ if (size.height < 1) {
+ el.setWidth(size.width);
+ } else {
+ el.setSize(size.width, size.height);
+ }
var touch = el.dom.offsetWidth;
this.layout.layout();
// ie requires a double layout on the first pass
setActiveState : function(active){
this.active = active;
+ this.setActiveClass(active);
+
if(!active){
this.fireEvent("deactivate", this);
return;