Roo/mailer/Body.js
[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     this.onRender = function() { };
35
36 };
37
38 Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component,  {
39     
40     
41     cls: '',
42      
43     
44     getAutoCreate : function(){
45         
46         var cfg ={
47             tag : 'center',
48             cn : [
49                 {
50                     tag: 'table',
51                     border : 0,
52                     cellpadding : 0,
53                     cellspacing : 0,
54                     height : '100%',
55                     align : 'center',
56                     cls: 'roo-m-body-table ' + this.cls,
57                     
58                     cn : [
59                         {
60                             tag : 'tr',
61                             cn : [
62                                 {
63                                     tag : 'td',
64                                     align : 'center',
65                                     valight : 'top',
66                                     cls : 'roo-m-body-cell'
67                                 }
68                             ]
69                         }
70                     ]
71                 }
72             ]
73         };
74          
75         
76         return cfg;
77     },
78     getChildContainer : function()
79     {
80         // add a child...
81          
82         return this.el.select('.roo-m-body-cell').first();
83     }
84     
85     
86     
87     
88    
89 });
90
91  
92
93