roojs-core.js
authorEdward <edward@roojs.com>
Thu, 10 Apr 2014 07:13:27 +0000 (15:13 +0800)
committerEdward <edward@roojs.com>
Thu, 10 Apr 2014 07:13:27 +0000 (15:13 +0800)
roojs-core-debug.js

roojs-core-debug.js
roojs-core.js

index 0feda90..a2f89f2 100644 (file)
@@ -15901,8 +15901,9 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
         if (this.parent.el === true) {
             // bootstrap... - body..
             this.parent.el = Roo.factory(tree);
+            Roo.log(this.parent.el);return;
         }
-        Roo.log(this.parent.el);
+        
         this.el = this.parent.el.addxtype(tree);
         this.fireEvent('built', this);
         
index 6f053d4..8f471df 100644 (file)
@@ -321,8 +321,8 @@ this.onPosition(ax,ay);this.fireEvent('move',this,ax,ay);}return this;},setPageP
 //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;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);}
-Roo.log(this.parent.el);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:[],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.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);Roo.log(this.parent.el);return;}
+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:[],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;}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;}
 o=o[e];});return o;},preBuild:function(){var _t=this;Roo.each(this.modules,function(A){Roo.XComponent.event.fireEvent('beforebuild',A);var B=A.parent;try{A.parent=this.toObject(B);}catch(e){Roo.log("parent:toObject failed: "+e.toString());return;}if(!A.parent){Roo.debug&&Roo.log("GOT top level module");Roo.debug&&Roo.log(A);A.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});this.topModule=A;return;}if(typeof(A.parent)=='string'){this.elmodules.push(A);return;}if(A.parent.constructor!=Roo.XComponent){Roo.log("Warning : Object Parent is not instance of XComponent:"+A.name)}if(!A.parent.modules){A.parent.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});}if(A.parent.disabled){A.disabled=true;}