From a5102177f2470f7baeb415cb19a22b0dc4075e1e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 27 Sep 2017 13:44:26 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js roojs-debug.js --- roojs-core-debug.js | 4 ++-- roojs-core.js | 2 +- roojs-debug.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 5259ebd599..9ad05ed888 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -16074,7 +16074,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { break; } - if (typeof(Roo.bootstrap.Body) != 'undefined') { + if (typeof(Roo.bootstrap.Body) != 'undefined' ) { this.parent = { el : new Roo.bootstrap.Body() }; Roo.debug && Roo.log("setting el to doc body"); @@ -16087,7 +16087,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { // fall through default: el = Roo.get(ename); - if (typeof(Roo.bootstrap) != 'undefined') { + if (typeof(Roo.bootstrap) != 'undefined' && tree['|xns'] == 'Roo.bootstrap') { this.parent = { el : true}; } diff --git a/roojs-core.js b/roojs-core.js index 8ea0479ac4..9e4456ae46 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -653,7 +653,7 @@ return this;},onResize:function(A,B,C,D){},onPosition:function(x,y){},adjustSize 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} ;break;}if(["Nest","Content","Grid","Tree"].indexOf(A.xtype)>-1){this.parent={el:new Roo.bootstrap.layout.Border({el:document.body,center:{titlebar:false,autoScroll:false,closeOnTab:true,tabPosition:'top',alwaysShowTabs:true,hideTabs:false}})};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);if(typeof(Roo.bootstrap)!='undefined'){this.parent={el:true} +;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);if(typeof(Roo.bootstrap)!='undefined'&&A['|xns']=='Roo.bootstrap'){this.parent={el:true} ;}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;if(typeof(Roo.BorderLayout)=='undefined'){this.parent={el:new Roo.bootstrap.layout.Border({el:el||document.body,center:{titlebar:false,autoScroll:false,closeOnTab:true,tabPosition:'top',alwaysShowTabs:false,hideTabs:true,minTabWidth:140,overflow:'visible'} })};}else{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; diff --git a/roojs-debug.js b/roojs-debug.js index 7f3875df7e..24f576aa81 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -16074,7 +16074,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { break; } - if (typeof(Roo.bootstrap.Body) != 'undefined') { + if (typeof(Roo.bootstrap.Body) != 'undefined' ) { this.parent = { el : new Roo.bootstrap.Body() }; Roo.debug && Roo.log("setting el to doc body"); @@ -16087,7 +16087,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { // fall through default: el = Roo.get(ename); - if (typeof(Roo.bootstrap) != 'undefined') { + if (typeof(Roo.bootstrap) != 'undefined' && tree['|xns'] == 'Roo.bootstrap') { this.parent = { el : true}; } -- 2.39.2