/**
* @class Roo.bootstrap.layout.Border
* @extends Roo.bootstrap.layout.Manager
+ * @builder-top
* This class represents a common layout manager used in desktop applications. For screenshots and more details,
* please see: examples/bootstrap/nested.html<br><br>
};
-Roo.bootstrap.layout.Border.regions = ["north","south","east","west","center"];
+Roo.bootstrap.layout.Border.regions = ["center", "north","south","east","west"];
Roo.extend(Roo.bootstrap.layout.Border, Roo.bootstrap.layout.Manager, {
+
+ parent : false, // this might point to a 'nest' or a ???
+
/**
* Creates and adds a new region if it doesn't already exist.
* @param {String} target The target region key (north, south, east, west or center).
if(this.updating) {
return;
}
+
+ // render all the rebions if they have not been done alreayd?
+ Roo.each(Roo.bootstrap.layout.Border.regions, function(region) {
+ if(this.regions[region] && !this.regions[region].bodyEl){
+ this.regions[region].onRender(this.el)
+ }
+ },this);
+
var size = this.getViewSize();
var w = size.width;
var h = size.height;
delete cfg.items;
}
var nb = false;
+
+ if ( region == 'center') {
+ Roo.log("Center: " + cfg.title);
+ }
+
switch(cfg.xtype)
{
case 'Content': // ContentPanel (el, cfg)
case 'Scroll': // ContentPanel (el, cfg)
case 'View':
- cfg.autoCreate = true;
+ cfg.autoCreate = cfg.autoCreate || true;
ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
//} else {
// var el = this.el.createChild();
// needs grid and region
//var el = this.getRegion(region).el.createChild();
- //var el = this.el.createChild();
+ /*
+ *var el = this.el.createChild();
// create the grid first...
- //cfg.grid.el = el;
+ cfg.grid.container = el;
cfg.grid = new cfg.grid.xns[cfg.grid.xtype](cfg.grid);
-
+ */
if (region == 'center' && this.active ) {
cfg.background = false;
ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
this.add(region, ret);
-
+ /*
if (cfg.background) {
// render grid on panel activation (if panel background)
ret.on('activate', function(gp) {
if (!gp.grid.rendered) {
- gp.grid.render();
+ // gp.grid.render(el);
}
});
} else {
- grid.render();
+ // cfg.grid.render(el);
}
+ */
break;