roojs-bootstrap.js
authorEdward <edward@roojs.com>
Wed, 23 Apr 2014 11:20:37 +0000 (19:20 +0800)
committerEdward <edward@roojs.com>
Wed, 23 Apr 2014 11:20:37 +0000 (19:20 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index c402149..7b7ac68 100644 (file)
@@ -160,15 +160,14 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         }
         
         var ret = false;
-        Roo.log(cn);
-        Roo.log(self_cntr_el);
+        
         while (true) {
             var echild =self_cntr_el ? self_cntr_el.child('>*[xtype]') : false;
             
             if (!echild) {
                 break;
             }
-            Roo.log(echild);
+            
             if (echild && echild.attr('xtype').split('.').pop() != cn.xtype) {
                 break;
             }
index 93d3d67..29c52d2 100644 (file)
@@ -2,8 +2,7 @@
 Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{allowDomMove:false,cls:false,style:false,autoCreate:false,initEvents:function(){},xattr:false,parentId:false,can_build_overlaid:true,dataId:false,name:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.attr('xtypex',this.el.attr('xtype'));this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.dataId){B.dataId=this.dataId;}if(this.cls){B.cls=(typeof(B.cls)=='undefined')?this.cls:B.cls+' '+this.cls;}if(this.style){B.style=this.style;}if(this.name){B.name=this.name;}
 this.el=ct.createChild(B,A);if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}
 this.initEvents();},getChildContainer:function(){return this.el;},addxtype:function(A,B){var cn=this;cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=typeof(B=='undefined')?'getChildContainer':B;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]());if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B);}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;Roo.log(cn);Roo.log(H);while(true){var I=H?H.child('>*[xtype]'):false;if(!I){break;}
-Roo.log(I);if(I&&I.attr('xtype').split('.').pop()!=cn.xtype){break;}
+Roo.log('skipping render');return cn;}var J=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){var cn=this;B=typeof(B=='undefined')?'getChildContainer':B;var C=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');if(A.xtype!='Body'){var D=Roo.factory(A);cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B]());var G=F?F.child('>*[xtype]'):false;if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else {Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));}}if(E&&C&&!cn.el&&cn.can_build_overlaid){Roo.log('skipping render');}else {cn.render(this[B]());}}var H=[];if(typeof(A.menu)!='undefined'){A.menu.parentType=cn.xtype;A.menu.triggerEl=cn.el;H.push(cn.addxtype(Roo.apply({},A.menu)));}if(!A.items||!A.items.length){cn.items=H;return cn;}var I=A.items;delete A.items;for(var i=0;i<I.length;i++){H.push(cn.addxtype(Roo.apply({},I[i])));}
 cn.items=H;return cn;}});
 //Roo/bootstrap/Body.js