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);
34 Roo.mailer.Body._calls++;
35 if (Roo.mailer.Body._calls > 1) {
41 this.onRender = function() { };
45 Roo.mailer.Body._calls = 0;
47 Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
53 getAutoCreate : function(){
65 cls: 'roo-m-body-table ' + this.cls,
75 cls : 'roo-m-body-cell'
87 getChildContainer : function()
91 return this.el.select('.roo-m-body-cell').first();
93 addxtype : function (tree, cntr)
95 return this.addxtypeChild(tree,cntr);
109 * <!-- BEGIN TEMPLATE // -->
110 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
112 <td align="center" valign="top">
117 * @class Roo.mailer.Block
118 * @extends Roo.bootstrap.Component
119 * Bootstrap Element class
120 * @cfg {String} cls class of the element
121 * @cfg {String} html content of header (not used for columns)
122 * @cfg {String} blocktype (header|preheader|footer|body|row)
125 * Create a new Element
126 * @param {Object} config The config object
129 Roo.mailer.Block = function(config){
130 Roo.mailer.Block.superclass.constructor.call(this, config);
133 Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, {
138 blocktype : 'header',
140 getAutoCreate : function(){
144 cls : 'roo-m-block-tr'
146 if (this.blocktype != 'row') {
152 cls : 'roo-m-' + this.blocktype + '-content',
165 cls: 'roo-m-' + this.blocktype + ' ' + this.cls,
174 getChildContainer : function(build_call)
177 if (this.blocktype == 'row' && build_call) {
178 var par = this.el.select(
179 '.roo-m-block-tr',true
181 return par.createChild( {
185 style : 'padding-top : 20px;',
192 return this.el.select('.roo-m-' + this.blocktype + '-content',true).first();
207 * <!-- BEGIN TEMPLATE // -->
208 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
210 <td align="center" valign="top">
215 * @class Roo.mailer.BodyContainer
216 * @extends Roo.bootstrap.Component
217 * Bootstrap Element class
218 * @cfg {String} cls class of the element
221 * Create a new Element
222 * @param {Object} config The config object
225 Roo.mailer.BodyContainer = function(config){
226 Roo.mailer.BodyContainer.superclass.constructor.call(this, config);
229 Roo.extend(Roo.mailer.BodyContainer, Roo.bootstrap.Component, {
235 getAutoCreate : function(){
242 cls: 'roo-m-body-container ' + this.cls,
252 getChildContainer : function()
255 var tr = this.el.select('tbody',true).first().createChild({
262 cls : 'roo-m-child-ctr'
267 return tr.select('.roo-m-child-ctr').first();
282 * <!-- BEGIN TEMPLATE // -->
283 <table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
285 <td align="center" valign="top">
290 * @class Roo.mailer.Column
291 * @extends Roo.bootstrap.Component
292 * Bootstrap Element class
293 * @cfg {String} cls class of the element
294 * @cfg {String} html content of body
295 * @cfg {String} src image url
296 * @cfg {String} column (left|right)
297 * @cfg {String width (100%|200|340|260)
300 * Create a new Element
301 * @param {Object} config The config object
304 Roo.mailer.Column = function(config){
305 Roo.mailer.Column.superclass.constructor.call(this, config);
308 Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, {
317 getAutoCreate : function(){
335 if (this.src != '') {
339 cls : 'roo-m-column-image',
341 style : 'max-width: ' + (this.width== '100%' ? '260' : this.width ) +'px;'
343 if (this.width != '100%' ) {
344 img.width = this.width;
353 cls : 'roo-m-column-'+ this.column + '-content',
368 cls : 'roo-m-column-'+ this.column + '-content roo-m-column-body',
377 getChildContainer : function()
381 return this.el.select('.roo-m-column-body',true).first();