Roo/bootstrap/layout/Border.js
[roojs1] / Roo / bootstrap / layout / Border.js
index bc0da4a..d92fdf6 100644 (file)
@@ -25,11 +25,9 @@ the container size if it is not the body element.</b>
  */
 Roo.bootstrap.layout.Border = function(config){
     config = config || {};
+    Roo.bootstrap.layout.Border.superclass.constructor.call(this, config);
     
-    Roo.log('Border construct!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
-    Roo.log(config);
     
-    Roo.bootstrap.layout.Border.superclass.constructor.call(this, config);
     
     Roo.each(Roo.bootstrap.layout.Border.regions, function(region) {
         if(config[region]){
@@ -51,7 +49,6 @@ Roo.extend(Roo.bootstrap.layout.Border, Roo.bootstrap.layout.Manager, {
      */
     addRegion : function(config)
     {
-        Roo.log('add region!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
         if(!this.regions[config.region]){
             var r = this.factory(config);
            this.bindRegion(r);
@@ -60,10 +57,7 @@ Roo.extend(Roo.bootstrap.layout.Border, Roo.bootstrap.layout.Manager, {
     },
 
     // private (kinda)
-    bindRegion : function(r)
-    {
-        Roo.log('bind region!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
-        
+    bindRegion : function(r){
         this.regions[r.config.region] = r;
         
         r.on("visibilitychange",    this.layout, this);
@@ -301,13 +295,18 @@ layout.addxtype({
             delete cfg.items;
         }
         var nb = false;
+       
+       if (cfg.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();