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     Roo.log("render body from ctor");
34     this.onRender(body);
35     this.onRender = function() { };
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