From: Alan Knowles Date: Tue, 29 Aug 2017 06:34:46 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=85fe065afd73e46ed76f822cac1ef54e3ab93a22 sync --- diff --git a/Roo/XComponent.js b/Roo/XComponent.js index e3c7fed44a..87c9cdd21c 100644 --- a/Roo/XComponent.js +++ b/Roo/XComponent.js @@ -254,6 +254,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { el = el ? Roo.get(el) : false; if (typeof(Roo.BorderLayout) == 'undefined' ) { + this.parent = { el : new Roo.bootstrap.layout.Border({ el: el || document.body, @@ -264,8 +265,8 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { closeOnTab: true, tabPosition: 'top', //resizeTabs: true, - alwaysShowTabs: el && hp? false : true, - hideTabs: el || !hp ? true : false, + alwaysShowTabs: false, + hideTabs: true, minTabWidth: 140 } }) diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 260a0db10b..26f1bdd3a0 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -16125,8 +16125,9 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { el = el ? Roo.get(el) : false; if (typeof(Roo.BorderLayout) == 'undefined' ) { + this.parent = { - el : new Roo.bootstrap.layout.border({ + el : new Roo.bootstrap.layout.Border({ el: el || document.body, center: { @@ -16135,8 +16136,8 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { closeOnTab: true, tabPosition: 'top', //resizeTabs: true, - alwaysShowTabs: el && hp? false : true, - hideTabs: el || !hp ? true : false, + alwaysShowTabs: false, + hideTabs: true, minTabWidth: 140 } }) diff --git a/roojs-core.js b/roojs-core.js index 1c115a7da9..d83b25c1b2 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -655,7 +655,7 @@ var hp=this.parent?1:0;Roo.debug&&Roo.log(this);var A=this._tree?this._tree():th ;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);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:el&&hp?false:true,hideTabs:el||!hp?true:false,minTabWidth:140} +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} })};}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; 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;this.parentLayout=this.parent.layout||false;}});Roo.apply(Roo.XComponent,{hideProgress:false,buildCompleted:false,topModule:false,modules:[],elmodules:[],is_alt:false,build_from_html:false,register:function(A){Roo.XComponent.event.fireEvent('register',A); switch(typeof(A.disabled)){case 'undefined':break;case 'function':if(A.disabled()){return;}break;default:if(A.disabled){return;}break;}this.modules.push(A);},toObject:function(str){if(!str||typeof(str)=='object'){return str;}if(str.substring(0,1)=='#'){return str;