roojs-bootstrap.js
authorEdward <edward@roojs.com>
Fri, 13 Feb 2015 06:24:33 +0000 (14:24 +0800)
committerEdward <edward@roojs.com>
Fri, 13 Feb 2015 06:24:33 +0000 (14:24 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 3f40c82..db7c7bb 100644 (file)
@@ -293,16 +293,12 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
  * @param {Object} config The config object
  */
 
-Roo.bootstrap.Body = function(config)
-{
-    //Roo.log(config);
+Roo.bootstrap.Body = function(config){
     Roo.bootstrap.Body.superclass.constructor.call(this, config);
     this.el = Roo.get(document.body);
     if (this.cls && this.cls.length) {
         Roo.get(document.body).addClass(this.cls);
     }
-    this.initEvents();
-    this.fireEvent('render',this);
 };
 
 Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
@@ -312,12 +308,12 @@ Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
     },
     onRender : function(ct, position)
     {
-       
-        // code has to go in the constructor,
-        // as body is not really rendered, it just picks up the document.body in the 
-        // constructor.
-        
-       
+       /* Roo.log("Roo.bootstrap.Body - onRender");
+        if (this.cls && this.cls.length) {
+            Roo.get(document.body).addClass(this.cls);
+        }
+        // style??? xttr???
+        */
     }
     
     
index 1b91f3f..98491ad 100644 (file)
@@ -6,8 +6,7 @@ Roo.log('skipping render');return cn;}var J=false;while(true){var I=H?H.child('>
 J=this.addxtypeChild(Roo.apply({},A),B);}return J;},addxtypeChild:function(A,B){Roo.log('addxtypeChild:'+B);var cn=this;B=(typeof(B)=='undefined')?'getChildContainer':B;var C=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');if(A.xtype!='Body'){cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var D=Roo.XComponent.build_from_html;if(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var E=Roo.get(this[B](false));var F=E?E.child('>*[xtype]'):false;if(F&&F.attr('xtype').split('.').pop()==cn.xtype){cn.el=F;}else {Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));}}if(D&&C&&!cn.el&&cn.can_build_overlaid){Roo.log('skipping render');}else {cn.render(this[B](true));}}var G=[];if(!A.items||!A.items.length){cn.items=G;return cn;}var H=A.items;delete A.items;for(var i=0;i<H.length;i++){G.push(cn.addxtype(Roo.apply({},H[i])));}
 cn.items=G;return cn;}});
 //Roo/bootstrap/Body.js
-Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);if(this.cls&&this.cls.length){Roo.get(document.body).addClass(this.cls);}
-this.initEvents();this.fireEvent('render',this);};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'},onRender:function(ct,A){}});
+Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);if(this.cls&&this.cls.length){Roo.get(document.body).addClass(this.cls);}};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'},onRender:function(ct,A){}});
 //Roo/bootstrap/ButtonGroup.js
 Roo.bootstrap.ButtonGroup=function(A){Roo.bootstrap.ButtonGroup.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.ButtonGroup,Roo.bootstrap.Component,{size:'',align:'',direction:'',toolbar:false,btn:true,getAutoCreate:function(){var A={cls:'btn-group',html:null}
 A.html=this.html||A.html;if(this.toolbar){A={cls:'btn-toolbar',html:null};return A;}if(['vertical','justified'].indexOf(this.align)!==-1){A.cls='btn-group-'+this.align;if(this.align=='justified'){console.log(this.items);}}if(['lg','sm','xs'].indexOf(this.size)!==-1){A.cls+=' btn-group-'+this.size;}if(this.direction=='up'){A.cls+=' dropup';}return A;}});