roojs-bootstrap.js
authorEdward <edward@roojs.com>
Wed, 2 Apr 2014 06:05:21 +0000 (14:05 +0800)
committerEdward <edward@roojs.com>
Wed, 2 Apr 2014 06:05:21 +0000 (14:05 +0800)
roojs-bootstrap-debug.js

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

index 3b3b577..c6cbc9f 100644 (file)
@@ -147,8 +147,6 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
             if(!has_flexy_if || typeof(tree.name) == 'undefined' || !build_from_html || is_body || !page_has_body){
                 return this.addxtypeChild(tree,cntr);
             }
-            Roo.log('here');
-            Roo.log(this);
             
             var echild =self_cntr_el ? self_cntr_el.child('>*[name=' + tree.name + ']') : false;
                 
@@ -207,26 +205,10 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
             // note - when we render we create these as well..
             // so we should check to see if body has xtype set.
             if (Roo.get(document.body).attr('xtype') == 'Roo.bootstrap.Body') {
-                Roo.log('this');
-                Roo.log(this);
-                Roo.log('cn');
-                Roo.log(cn);
-                Roo.log('test');
-                Roo.log(test);
-                
+               
                 var self_cntr_el = Roo.get(this[cntr]());
                 var echild =self_cntr_el ? self_cntr_el.child('>*[xtype]') : false;
                 
-                Roo.log('self_cntr_el');
-                Roo.log(self_cntr_el);
-                
-                Roo.log('echild');
-                Roo.log(echild);
-                
-                if(echild){
-                    Roo.log(echild.attr('xbuilderid'));
-                }
-                
                 if (echild && echild.attr('xtype').split('.').pop() == cn.xtype) {
                   //  Roo.log("found child for " + this.xtype +": " + echild.attr('xtype') );
                   
@@ -275,10 +257,6 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         var items = tree.items;
         delete tree.items;
         
-        Roo.log('tree');
-        Roo.log(tree);
-        Roo.log('itmes');
-        Roo.log(items);
         //Roo.log(items.length);
             // add the items..
         for(var i =0;i < items.length;i++) {
index aa6917f..3a84b09 100644 (file)
@@ -1,10 +1,9 @@
 //Roo/bootstrap/Component.js
 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);}
-Roo.log('here');Roo.log(this);var I=H?H.child('>*[name='+A.name+']'):false;if(I){return this.addxtypeChild(Roo.apply({},A),B);}
+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;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'){Roo.log('this');Roo.log(this);Roo.log('cn');Roo.log(cn);Roo.log('test');Roo.log(D);var F=Roo.get(this[B]());var G=F?F.child('>*[xtype]'):false;Roo.log('self_cntr_el');Roo.log(F);Roo.log('echild');Roo.log(G);if(G){Roo.log(G.attr('xbuilderid'));}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;Roo.log('tree');Roo.log(A);Roo.log('itmes');Roo.log(I);for(var i=0;i<I.length;i++){H.push(cn.addxtype(Roo.apply({},I[i])));}
+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
 Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'},onRender:function(ct,A){}});