39dc3654c40e42c27749d23d50354fd07a205159
[roojs1] / Roo / bootstrap / Body.js
1 /*
2  * - LGPL
3  *
4  * Body
5  *
6  */
7
8 /**
9  * @class Roo.bootstrap.Body
10  * @extends Roo.bootstrap.Component
11  * Bootstrap Body class
12  *
13  * @constructor
14  * Create a new body
15  * @param {Object} config The config object
16  * @cfg {DomElement} do_render - if this is set, then the constructor will try and initialize render, using this as the start point
17  
18  */
19
20 Roo.bootstrap.Body = function(config){
21
22     config = config || {};
23
24     Roo.bootstrap.Body.superclass.constructor.call(this, config);
25     this.el = Roo.get(config.el ? config.el : document.body );
26     if (this.cls && this.cls.length) {
27         Roo.get(document.body).addClass(this.cls);
28     }
29     if (config.do_render) {
30         this.onRender(config.do_render, '');
31         this.addxtypeChildren(config.items);
32         
33     }
34     
35 };
36
37 Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
38
39     do_render : false,
40     is_body : true,// just to make sure it's constructed?
41
42     autoCreate : {
43         cls: 'container'
44     },
45     onRender : function(ct, position)
46     {
47         
48         /* Roo.log("Roo.bootstrap.Body - onRender");
49         if (this.cls && this.cls.length) {
50             Roo.get(document.body).addClass(this.cls);
51         }
52         // style??? xttr???
53         */
54     }
55
56
57
58
59 });