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