4891b916accd104753096be2285c574a05581d11
[roojs1] / Roo / mailer / Body.js
1 /*
2  * - LGPL
3  *
4  * element
5  
6                               
7  */
8 Roo.mailer = Roo.mailer || {};
9
10 /**
11  * @class Roo.mailer.BodyContainer 
12  * @extends Roo.bootstrap.Component
13  * Bootstrap Element class
14  * @cfg {String} cls class of the element
15  * 
16  * @constructor
17  * Create a new Element
18  * @param {Object} config The config object
19  */
20
21
22 Roo.mailer.Body  = function(config){
23     Roo.mailer.Body.superclass.constructor.call(this, config);
24     //this.el = Roo.get(document.body);
25     var body = Roo.get(document.body);
26     body.attr({
27         leftmargin : 0,
28         marginwidth : 0,
29         topmargin : 0,
30         marginheight : 0,
31         offset : 0
32     });
33     this.onRender(body);
34
35 };
36
37 Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component,  {
38     
39     
40     cls: '',
41      
42     
43     getAutoCreate : function(){
44         
45         var cfg ={
46             tag : 'center',
47             cn : [
48                 {
49                     tag: 'table',
50                     border : 0,
51                     cellpadding : 0,
52                     cellspacing : 0,
53                     height : '100%',
54                     align : 'center',
55                     cls: 'roo-m-body-table ' + this.cls,
56                     
57                     cn : [
58                         {
59                             tag : 'tr',
60                             cn : [
61                                 {
62                                     tag : 'td',
63                                     align : 'center',
64                                     valight : 'top',
65                                     cls : 'roo-m-body-cell'
66                                 }
67                             ]
68                         }
69                     ]
70                 }
71             ]
72         };
73          
74         
75         return cfg;
76     },
77     getChildContainer : function()
78     {
79         // add a child...
80          
81         return this.el.select('.roo-m-body-cell').first();
82     }
83     
84     
85     
86     
87    
88 });
89
90  
91
92