From 7855ebf8280bc762cc721379562fdec1e827dcce Mon Sep 17 00:00:00 2001 From: Edward Date: Fri, 21 Mar 2014 20:10:17 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js --- roojs-core-debug.js | 2 +- roojs-core.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 2cb15573c1..9f7e9ff0dc 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -15866,7 +15866,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { } } - + Roo.log(el); if (!this.parent) { el = el ? Roo.get(el) : false; diff --git a/roojs-core.js b/roojs-core.js index 00942225f7..fa96870ff6 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -322,7 +322,8 @@ this.onPosition(ax,ay);this.fireEvent('move',this,ax,ay);}return this;},setPageP 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.log('hp') Roo.log(this.parent.substr(1));if(!el&&typeof(this.parent)=='string'&&this.parent.substring(0,1)=='#'){var A=this.parent.substr(1) -this.parent=(this.parent=='#bootstrap')?{el:true}:false;el=Roo.get(A);if(!el&&!this.parent){Roo.log("Warning - element can not be found :#"+A);return;}}if(!this.parent){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;}var B=this._tree?this._tree():this.tree();B.region=B.region||this.region;if(this.parent.el===true){this.parent.el=Roo.factory(B);} +this.parent=(this.parent=='#bootstrap')?{el:true}:false;el=Roo.get(A);if(!el&&!this.parent){Roo.log("Warning - element can not be found :#"+A);return;}} +Roo.log(el);if(!this.parent){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;}var B=this._tree?this._tree():this.tree();B.region=B.region||this.region;if(this.parent.el===true){this.parent.el=Roo.factory(B);} this.el=this.parent.el.addxtype(B);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:[],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;}var ar=str.split('.');var rt,o;rt=ar.shift();try{eval('if (typeof '+rt+' == "undefined"){ o = false;} o = '+rt+';');}catch(e){throw "Module not found : "+str;}if(o===false){throw "Module not found : "+str;} Roo.each(ar,function(e){if(typeof(o[e])=='undefined'){throw "Module not found : "+str;} -- 2.39.2