roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2019 08:58:22 +0000 (16:58 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2019 08:58:22 +0000 (16:58 +0800)
roojs-bootstrap-debug.js
roojs-calendar.js
roojs-calendar-debug.js
Roo/bootstrap/Component.js

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

index 30ee2ac..b5789bd 100644 (file)
@@ -196,7 +196,8 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         
         if (!has_flexy_each || !build_from_html || is_body || !page_has_body) {
             if(!has_flexy_if || typeof(tree.name) == 'undefined' || !build_from_html || is_body || !page_has_body){
-                return this.addxtypeChild(tree,cntr, is_body);
+                //return this.addxtypeChild(tree,cntr, is_body);
+               return this.addxtypeChild(cn, cntr, is_body);
             }
             
             var echild =self_cntr_el ? self_cntr_el.child('>*[name=' + tree.name + ']') : false;
index f058144..946185e 100644 (file)
@@ -181,13 +181,11 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
      */
     addxtype  : function(tree,cntr)
     {
-        var cn = Roo.factory(tree);
-        //Roo.log(['addxtype', cn]);
-           
+        cntr = (typeof(cntr) == 'undefined' ) ? 'getChildContainer' : cntr;
+       
+       var cn = Roo.factory(tree); // this is posibly the first of two times that the ctor get's called...
         cn.parentType = this.xtype; //??
         cn.parentId = this.id;
-        
-        cntr = (typeof(cntr) == 'undefined' ) ? 'getChildContainer' : cntr;
         if (typeof(cn.container_method) == 'string') {
             cntr = cn.container_method;
         }
index ca50904..08dfbcc 100644 (file)
@@ -5,7 +5,7 @@ Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstra
 ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,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=this.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.tooltip){this.tooltipEl().attr('tooltip',this.tooltip);}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);
-}this.initEvents();},getChildContainer:function(){return this.el;},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;
+}this.initEvents();},getChildContainer:function(){return this.el;},tooltipEl:function(){return this.el;},addxtype:function(A,B){B=(typeof(B)=='undefined')?'getChildContainer':B;var cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;if(typeof(cn.container_method)=='string'){B=cn.container_method;
 }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;
index 87a4df5..80b8912 100644 (file)
@@ -167,13 +167,11 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
      */
     addxtype  : function(tree,cntr)
     {
-        var cn = Roo.factory(tree);
-        //Roo.log(['addxtype', cn]);
-           
+        cntr = (typeof(cntr) == 'undefined' ) ? 'getChildContainer' : cntr;
+       
+       var cn = Roo.factory(tree); // this is posibly the first of two times that the ctor get's called...
         cn.parentType = this.xtype; //??
         cn.parentId = this.id;
-        
-        cntr = (typeof(cntr) == 'undefined' ) ? 'getChildContainer' : cntr;
         if (typeof(cn.container_method) == 'string') {
             cntr = cn.container_method;
         }
index 370a4a1..77bb989 100644 (file)
@@ -3,7 +3,7 @@ Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstra
 ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,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=this.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.tooltip){this.tooltipEl().attr('tooltip',this.tooltip);}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);
-}this.initEvents();},getChildContainer:function(){return this.el;},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;
+}this.initEvents();},getChildContainer:function(){return this.el;},tooltipEl:function(){return this.el;},addxtype:function(A,B){B=(typeof(B)=='undefined')?'getChildContainer':B;var cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;if(typeof(cn.container_method)=='string'){B=cn.container_method;
 }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;