roojs-core.js
[roojs1] / Roo / mailer / BodyContainer.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.BodyContainer = function(config){
24     Roo.mailer.BodyContainer.superclass.constructor.call(this, config);
25 };
26
27 Roo.extend(Roo.mailer.BodyContainer, Roo.bootstrap.Component,  {
28     
29     
30     cls: '',
31      
32     
33     getAutoCreate : function(){
34         
35         var cfg = {
36             tag: 'table',
37             border : 0,
38             cellpadding : 0,
39             cellspacing : 0,
40             cls: 'roo-m-body-container ' + this.cls,
41             cn : [
42                 {  tag : 'tbody' }
43             ]
44         };
45         
46         
47         
48         return cfg;
49     },
50     getChildContainer : function()
51     {
52         // add a child...
53         var tr = this.el.select('tbody',true).first().createChild({
54                     tag : 'tr',
55                     cn : [
56                         {   
57                             tag:  'td',
58                             align : 'center',
59                             valign : 'top',
60                             cls : 'roo-m-child-ctr'
61                         }
62                     ]
63                 });
64         
65         return tr.select('.roo-m-child-ctr').first();
66     }
67     
68     
69     
70     
71    
72 });
73
74  
75
76