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