Roo/bootstrap/Component.js
authoredward <edward@roojs.com>
Thu, 24 May 2018 05:24:10 +0000 (13:24 +0800)
committeredward <edward@roojs.com>
Thu, 24 May 2018 05:24:10 +0000 (13:24 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index ba0138a..baea97b 100644 (file)
@@ -247,9 +247,8 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         // render the element if it's not BODY.
         if (!is_body) {
             
-            Roo.log(this[cntr](true));
             // if parent was disabled, then do not try and create the children..
-            if(this[cntr](true) === false || this[cntr](true) === null){
+            if(this[cntr](true) === false || this[cntr](true) === null || typeof(this[cntr](true)) == 'undefined'){
                 tree.items = [];
                 return tree;
             }
index 1caaa95..1a17794 100644 (file)
@@ -247,9 +247,8 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         // render the element if it's not BODY.
         if (!is_body) {
             
-            Roo.log(this[cntr](true));
             // if parent was disabled, then do not try and create the children..
-            if(this[cntr](true) === false || this[cntr](true) === null){
+            if(this[cntr](true) === false || this[cntr](true) === null || typeof(this[cntr](true)) == 'undefined'){
                 tree.items = [];
                 return tree;
             }
index 58459b4..a62efa9 100644 (file)
@@ -7,8 +7,8 @@ this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply(
 }var C=(typeof(A['flexy:foreach'])!='undefined');var D=(typeof(A['flexy:if'])!='undefined');var E=Roo.XComponent.build_from_html;var F=(A.xtype=='Body');var G=(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body');var H=Roo.get(this[B](false));if((C||D||this.can_build_overlaid==false)&&E){return false;
 }if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B,F);}var I=H?H.child('>*[name='+A.name+']'):false;if(I){return this.addxtypeChild(Roo.apply({},A),B);}Roo.log('skipping render');return cn;}var J=false;if(!E){return false;
 }while(true){var I=H?H.child('>*[xtype]'):false;if(!I){break;}if(I&&I.attr('xtype').split('.').pop()!=cn.xtype){break;}J=this.addxtypeChild(Roo.apply({},A),B);}return J;},addxtypeChild:function(A,B,C){Roo.debug&&Roo.log('addxtypeChild:'+B);var cn=this;B=(typeof(B)=='undefined')?'getChildContainer':B;
-var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');skip_children=false;if(!C){Roo.log(this[B](true));if(this[B](true)===false||this[B](true)===null){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;
-var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false));var G=F?F.child('>*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));
+var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');skip_children=false;if(!C){if(this[B](true)===false||this[B](true)===null||typeof(this[B](true))=='undefined'){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;
+cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false));var G=F?F.child('>*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));
 Roo.debug&&Roo.log(F);Roo.debug&&Roo.log(G);Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo.log('skipping render');Roo.debug&&Roo.log(A);if(!cn.el){Roo.debug&&Roo.log('skipping all children');skip_children=true;}}else{cn.render&&cn.render(this[B](true));
 }}var H=[];if(!A.items||!A.items.length){cn.items=H;return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i<I.length;i++){H.push(cn.addxtype(Roo.apply({},I[i])));}}cn.items=H;cn.fireEvent('childrenrendered',this);return cn;},show:function(){if(this.el){this.el.removeClass('hidden');
 }},hide:function(){if(this.el&&!this.el.hasClass('hidden')){this.el.addClass('hidden');}}});