projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix css for date
[roojs1]
/
roojs-mailer-debug.js
diff --git
a/roojs-mailer-debug.js
b/roojs-mailer-debug.js
index
1ce2525
..
6b172f9
100644
(file)
--- a/
roojs-mailer-debug.js
+++ b/
roojs-mailer-debug.js
@@
-19,6
+19,7
@@
Roo.mailer = Roo.mailer || {};
*/
*/
+
Roo.mailer.Body = function(config){
Roo.mailer.Body.superclass.constructor.call(this, config);
//this.el = Roo.get(document.body);
Roo.mailer.Body = function(config){
Roo.mailer.Body.superclass.constructor.call(this, config);
//this.el = Roo.get(document.body);
@@
-30,10
+31,19
@@
Roo.mailer.Body = function(config){
marginheight : 0,
offset : 0
});
marginheight : 0,
offset : 0
});
+ Roo.mailer.Body._calls++;
+ if (Roo.mailer.Body._calls > 1) {
+ return;
+ throw "test";
+ }
+
this.onRender(body);
this.onRender(body);
+ this.onRender = function() { };
};
};
+Roo.mailer.Body._calls = 0;
+
Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
@@
-79,9
+89,12
@@
Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, {
// add a child...
return this.el.select('.roo-m-body-cell').first();
// add a child...
return this.el.select('.roo-m-body-cell').first();
+ },
+ addxtype : function (tree, cntr)
+ {
+ return this.addxtypeChild(tree,cntr);
}
}
-
-
+
@@
-129,9
+142,9
@@
Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, {
var tr = {
tag : 'tr',
cls : 'roo-m-block-tr'
var tr = {
tag : 'tr',
cls : 'roo-m-block-tr'
- }
+ }
;
if (this.blocktype != 'row') {
if (this.blocktype != 'row') {
- tr.cn = [
+
tr.cn = [
{
tag : 'td',
align : 'center',
{
tag : 'td',
align : 'center',
@@
-139,7
+152,7
@@
Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, {
cls : 'roo-m-' + this.blocktype + '-content',
html : this.html
}
cls : 'roo-m-' + this.blocktype + '-content',
html : this.html
}
- ]
+ ];
}
var cfg = {
}
var cfg = {
@@
-170,7
+183,7
@@
Roo.extend(Roo.mailer.Block, Roo.bootstrap.Component, {
align : 'center',
valign : 'top',
style : 'padding-top : 20px;',
align : 'center',
valign : 'top',
style : 'padding-top : 20px;',
- cls : 'roo-m-
row
'
+ cls : 'roo-m-
column
'
}
);
}
);
@@
-281,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} 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
*
* @constructor
* Create a new Element
@@
-298,13
+312,14
@@
Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, {
html : '',
src : '',
column : 'left',
html : '',
src : '',
column : 'left',
+ width : '100%',
getAutoCreate : function(){
var tr = {
tag : 'tr',
cn : [ ]
getAutoCreate : function(){
var tr = {
tag : 'tr',
cn : [ ]
- }
+ }
;
@@
-313,11
+328,21
@@
Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, {
border : 0,
cellpadding :20,
cellspacing : 0,
border : 0,
cellpadding :20,
cellspacing : 0,
- width :
'100%'
,
+ width :
this.width
,
cn : []
};
if (this.src != '') {
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 : [
cfg.cn.push({
tag : 'tr',
cn : [
@@
-326,14
+351,8
@@
Roo.extend(Roo.mailer.Column, Roo.bootstrap.Component, {
align : 'center',
valight : 'top',
cls : 'roo-m-column-'+ this.column + '-content',
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 ]
+
}
]
});
}
]
});