X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-mailer-debug.js;h=6b172f916bd42a05f5c55d3111430388c97b102c;hp=4cf60545e707c898da6f7896fceb2f84fe52718c;hb=c47e24f9bde6e0a7a5994c0024daa13e7e4df117;hpb=a3015aff0edc0cbf8cac73405ab285332c4041bf diff --git a/roojs-mailer-debug.js b/roojs-mailer-debug.js index 4cf60545e7..6b172f916b 100644 --- a/roojs-mailer-debug.js +++ b/roojs-mailer-debug.js @@ -18,7 +18,7 @@ Roo.mailer = Roo.mailer || {}; * @param {Object} config The config object */ -_calls = 0; + Roo.mailer.Body = function(config){ Roo.mailer.Body.superclass.constructor.call(this, config); @@ -31,8 +31,9 @@ Roo.mailer.Body = function(config){ marginheight : 0, offset : 0 }); - _calls++; - if (_calls > 1) { + Roo.mailer.Body._calls++; + if (Roo.mailer.Body._calls > 1) { + return; throw "test"; } @@ -41,6 +42,8 @@ Roo.mailer.Body = function(config){ }; +Roo.mailer.Body._calls = 0; + Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, { @@ -139,9 +142,9 @@ Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, { var tr = { tag : 'tr', cls : 'roo-m-block-tr' - } + }; if (this.blocktype != 'row') { - tr.cn = [ + tr.cn = [ { tag : 'td', align : 'center', @@ -149,7 +152,7 @@ Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, { cls : 'roo-m-' + this.blocktype + '-content', html : this.html } - ] + ]; } var cfg = { @@ -291,6 +294,7 @@ Roo.extend(Roo.mailer.BodyContainer, Roo.bootstrap.Component, { * @cfg {String} html content of body * @cfg {String} src image url * @cfg {String} column (left|right) + * @cfg {String width (100%|200|340|260) * * @constructor * Create a new Element @@ -308,13 +312,14 @@ Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, { html : '', src : '', column : 'left', + width : '100%', getAutoCreate : function(){ var tr = { tag : 'tr', cn : [ ] - } + }; @@ -323,11 +328,21 @@ Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, { border : 0, cellpadding :20, cellspacing : 0, - width : '100%', + width : this.width, cn : [] }; if (this.src != '') { + var img = { + tag : 'img', + src : this.src, + cls : 'roo-m-column-image', + + style : 'max-width: ' + (this.width== '100%' ? '260' : this.width ) +'px;' + }; + if (this.width != '100%' ) { + img.width = this.width; + } cfg.cn.push({ tag : 'tr', cn : [ @@ -336,14 +351,8 @@ Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, { align : 'center', valight : 'top', cls : 'roo-m-column-'+ this.column + '-content', - cn : [ - { - tag : 'img', - src : this.src, - cls : 'roo-m-column-image', - style : 'max-width: 260px;' - } - ] + cn : [ img ] + } ] });