8 Roo.mailer = Roo.mailer || {};
11 * @class Roo.mailer.BodyContainer
12 * @extends Roo.bootstrap.Component
13 * Bootstrap Element class
14 * @cfg {String} cls class of the element
17 * Create a new Element
18 * @param {Object} config The config object
23 Roo.mailer.Body = function(config){
24 Roo.mailer.Body.superclass.constructor.call(this, config);
25 //this.el = Roo.get(document.body);
26 var body = Roo.get(document.body);
40 this.onRender = function() { };
44 Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
50 getAutoCreate : function(){
62 cls: 'roo-m-body-table ' + this.cls,
72 cls : 'roo-m-body-cell'
84 getChildContainer : function()
88 return this.el.select('.roo-m-body-cell').first();
90 addxtype : function (tree, cntr)
92 return this.addxtypeChild(tree,cntr);
106 * <!-- BEGIN TEMPLATE // -->
107 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
109 <td align="center" valign="top">
114 * @class Roo.mailer.Block
115 * @extends Roo.bootstrap.Component
116 * Bootstrap Element class
117 * @cfg {String} cls class of the element
118 * @cfg {String} html content of header (not used for columns)
119 * @cfg {String} blocktype (header|preheader|footer|body|row)
122 * Create a new Element
123 * @param {Object} config The config object
126 Roo.mailer.Block = function(config){
127 Roo.mailer.Block.superclass.constructor.call(this, config);
130 Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, {
135 blocktype : 'header',
137 getAutoCreate : function(){
141 cls : 'roo-m-block-tr'
143 if (this.blocktype != 'row') {
149 cls : 'roo-m-' + this.blocktype + '-content',
162 cls: 'roo-m-' + this.blocktype + ' ' + this.cls,
171 getChildContainer : function(build_call)
174 if (this.blocktype == 'row' && build_call) {
175 var par = this.el.select(
176 '.roo-m-block-tr',true
178 return par.createChild( {
182 style : 'padding-top : 20px;',
189 return this.el.select('.roo-m-' + this.blocktype + '-content',true).first();
204 * <!-- BEGIN TEMPLATE // -->
205 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
207 <td align="center" valign="top">
212 * @class Roo.mailer.BodyContainer
213 * @extends Roo.bootstrap.Component
214 * Bootstrap Element class
215 * @cfg {String} cls class of the element
218 * Create a new Element
219 * @param {Object} config The config object
222 Roo.mailer.BodyContainer = function(config){
223 Roo.mailer.BodyContainer.superclass.constructor.call(this, config);
226 Roo.extend(Roo.mailer.BodyContainer, Roo.bootstrap.Component, {
232 getAutoCreate : function(){
239 cls: 'roo-m-body-container ' + this.cls,
249 getChildContainer : function()
252 var tr = this.el.select('tbody',true).first().createChild({
259 cls : 'roo-m-child-ctr'
264 return tr.select('.roo-m-child-ctr').first();
279 * <!-- BEGIN TEMPLATE // -->
280 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
282 <td align="center" valign="top">
287 * @class Roo.mailer.Column
288 * @extends Roo.bootstrap.Component
289 * Bootstrap Element class
290 * @cfg {String} cls class of the element
291 * @cfg {String} html content of body
292 * @cfg {String} src image url
293 * @cfg {String} column (left|right)
296 * Create a new Element
297 * @param {Object} config The config object
300 Roo.mailer.Column = function(config){
301 Roo.mailer.Column.superclass.constructor.call(this, config);
304 Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, {
312 getAutoCreate : function(){
330 if (this.src != '') {
338 cls : 'roo-m-column-'+ this.column + '-content',
343 cls : 'roo-m-column-image',
344 style : 'max-width: 260px;'
359 cls : 'roo-m-column-'+ this.column + '-content roo-m-column-body',
368 getChildContainer : function()
372 return this.el.select('.roo-m-column-body',true).first();