roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2019 07:52:08 +0000 (15:52 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2019 07:52:08 +0000 (15:52 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/Body.js

Roo/bootstrap/Body.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index d335b4b..7f2774a 100644 (file)
@@ -27,7 +27,8 @@ Roo.bootstrap.Body = function(config){
         Roo.get(document.body).addClass(this.cls);
     }
     if (config.do_render) {
-       this.onRender(config.do_render, '')
+       this.onRender(config.do_render, '');
+       this.addxtypeChildren(config.items);
     }
     
 };
index 799d6ac..3efd498 100644 (file)
@@ -475,14 +475,16 @@ Roo.bootstrap.Body = function(config){
     if (this.cls && this.cls.length) {
         Roo.get(document.body).addClass(this.cls);
     }
-    if (this.do_render) {
-       this.onRender(do_render, '')
+    if (config.do_render) {
+       this.onRender(config.do_render, '');
+       this.addxtypeChildren(config.items);
     }
     
 };
 
 Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
 
+    do_render : false,
     is_body : true,// just to make sure it's constructed?
 
     autoCreate : {
@@ -490,7 +492,8 @@ Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
     },
     onRender : function(ct, position)
     {
-       /* Roo.log("Roo.bootstrap.Body - onRender");
+        
+        /* Roo.log("Roo.bootstrap.Body - onRender");
         if (this.cls && this.cls.length) {
             Roo.get(document.body).addClass(this.cls);
         }
index 730c1bd..2f60242 100644 (file)
@@ -16,8 +16,8 @@ delete A.items;return cn;},addxtypeChildren:function(A,B){var C=[];if(!A||!A.len
 },getVisibilityEl:function(){if(typeof(this.visibilityEl)=='object'){return this.visibilityEl;}if(typeof(this.visibilityEl)=='string'){return this.visibilityEl=='parent'?this.parent().getEl():this.getEl();}return this.getEl();},show:function(){if(!this.getVisibilityEl()){return;
 }this.getVisibilityEl().removeClass(['hidden','d-none']);this.fireEvent('show',this);},hide:function(){if(!this.getVisibilityEl()){return;}this.getVisibilityEl().addClass(['hidden','d-none']);this.fireEvent('hide',this);}});
 // Roo/bootstrap/Body.js
-Roo.bootstrap.Body=function(A){A=A||{};Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(A.el?A.el:document.body);if(this.cls&&this.cls.length){Roo.get(document.body).addClass(this.cls);}if(this.do_render){this.onRender(do_render,'')}}
-;Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{is_body:true,autoCreate:{cls:'container'},onRender:function(ct,A){}});
+Roo.bootstrap.Body=function(A){A=A||{};Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(A.el?A.el:document.body);if(this.cls&&this.cls.length){Roo.get(document.body).addClass(this.cls);}if(A.do_render){this.onRender(A.do_render,'');this.addxtypeChildren(A.items);
+}};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{do_render:false,is_body:true,autoCreate:{cls:'container'},onRender:function(ct,A){}});
 // Roo/bootstrap/ButtonGroup.js
 Roo.bootstrap.ButtonGroup=function(A){Roo.bootstrap.ButtonGroup.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.ButtonGroup,Roo.bootstrap.Component,{size:'',align:'',direction:'',toolbar:false,btn:true,getAutoCreate:function(){var A={cls:'btn-group',html:null}
 ;A.html=this.html||A.html;if(this.toolbar){A={cls:'btn-toolbar',html:null};return A;}if(['vertical','justified'].indexOf(this.align)!==-1){A.cls='btn-group-'+this.align;if(this.align=='justified'){console.log(this.items);}}if(['lg','sm','xs'].indexOf(this.size)!==-1){A.cls+=' btn-group-'+this.size;