Roo/XComponent.js
authorAlan Knowles <alan@roojs.com>
Wed, 5 Jul 2017 06:34:48 +0000 (14:34 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 5 Jul 2017 06:34:48 +0000 (14:34 +0800)
roojs-core.js
roojs-core-debug.js

Roo/XComponent.js
roojs-core-debug.js
roojs-core.js

index 2fcca52..450e528 100644 (file)
@@ -179,6 +179,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
                     if (typeof(tree.el) != 'undefined' && tree.el == document.body)  {
                         // this is the BorderLayout standard?
                        this.parent = { el : true };
+                       break;
                     }
                     
                     if (typeof(Roo.bootstrap.Body) != 'undefined') {
index b394ab7..f2b3d2f 100644 (file)
@@ -16003,7 +16003,9 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
             switch (ename) {
                 case 'bootstrap-body':
                     if (typeof(tree.el) != 'undefined' && tree.el == document.body)  {
-                       this.parent = { el : true };;
+                        // this is the BorderLayout standard?
+                       this.parent = { el : true };
+                       break;
                     }
                     
                     if (typeof(Roo.bootstrap.Body) != 'undefined') {
index 9d51ac6..bab8f02 100644 (file)
@@ -650,7 +650,7 @@ return this;},onResize:function(A,B,C,D){},onPosition:function(x,y){},adjustSize
 // Roo/XComponent.js
 Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true});this.region=this.region||'center';Roo.XComponent.register(this);this.modules=false;this.el=false;};Roo.extend(Roo.XComponent,Roo.util.Observable,{el:false,panel:false,layout:false,disabled:false,parent:false,order:false,name:false,region:'center',items:false,_tree:false,render:function(el){el=el||false;
 var hp=this.parent?1:0;Roo.debug&&Roo.log(this);var A=this._tree?this._tree():this.tree();if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var B=this.parent.substr(1);this.parent=false;Roo.debug&&Roo.log(B);switch(B){case 'bootstrap-body':if(typeof(A.el)!='undefined'&&A.el==document.body){this.parent={el:true}
-;;}if(typeof(Roo.bootstrap.Body)!='undefined'){this.parent={el:new Roo.bootstrap.Body()};Roo.debug&&Roo.log("setting el to doc body");}else{throw "Container is bootstrap body, but Roo.bootstrap.Body is not defined";}break;case 'bootstrap':this.parent={el:true}
+;break;}if(typeof(Roo.bootstrap.Body)!='undefined'){this.parent={el:new Roo.bootstrap.Body()};Roo.debug&&Roo.log("setting el to doc body");}else{throw "Container is bootstrap body, but Roo.bootstrap.Body is not defined";}break;case 'bootstrap':this.parent={el:true}
 ;default:el=Roo.get(B);break;}if(!el&&!this.parent){Roo.debug&&Roo.log("Warning - element can not be found :#"+B);return;}}Roo.debug&&Roo.log("EL:");Roo.debug&&Roo.log(el);Roo.debug&&Roo.log("this.parent.el:");Roo.debug&&Roo.log(this.parent.el);var C=Roo.XComponent.is_alt||(typeof(A.el)!='undefined'&&A.el==document.body)||(typeof(Roo.bootstrap)!='undefined'&&A.xns==Roo.bootstrap)||(typeof(Roo.mailer)!='undefined'&&A.xns==Roo.mailer);
 if(!this.parent&&C){this.parent={el:true};}if(!this.parent){Roo.debug&&Roo.log("no parent - creating one");el=el?Roo.get(el):false;this.parent={el:new Roo.BorderLayout(el||document.body,{center:{titlebar:false,autoScroll:false,closeOnTab:true,tabPosition:'top',alwaysShowTabs:el&&hp?false:true,hideTabs:el||!hp?true:false,minTabWidth:140}
 })};}if(!this.parent.el){return;}A.region=A.region||this.region;var D=false;if(this.parent.el===true){this.parent.el=Roo.factory(A);D=true;}this.el=this.parent.el.addxtype(A,undefined,D);this.fireEvent('built',this);this.panel=this.el;this.layout=this.panel.layout;