From 206b026856a0c19b284c1397f43e9fae42db52d2 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 18 Sep 2014 17:42:50 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js roojs-mailer.js roojs-mailer-debug.js --- roojs-mailer-debug.js | 14 ++++++++++++-- roojs-mailer.js | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/roojs-mailer-debug.js b/roojs-mailer-debug.js index 1ce2525b74..2654b4b720 100644 --- a/roojs-mailer-debug.js +++ b/roojs-mailer-debug.js @@ -18,6 +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); @@ -30,7 +31,13 @@ Roo.mailer.Body = function(config){ marginheight : 0, offset : 0 }); + _calls++; + if (_calls > 1) { + throw "test"; + } + this.onRender(body); + this.onRender = function() { }; }; @@ -79,9 +86,12 @@ Roo.extend(Roo.mailer.Body, Roo.bootstrap.Component, { // add a child... return this.el.select('.roo-m-body-cell').first(); + }, + addxtype : function (tree, cntr) + { + this.addxtypeChild(tree,cntr); } - - + diff --git a/roojs-mailer.js b/roojs-mailer.js index 92b67b527b..20490c2802 100644 --- a/roojs-mailer.js +++ b/roojs-mailer.js @@ -1,5 +1,6 @@ //Roo/mailer/Body.js -Roo.mailer=Roo.mailer||{};Roo.mailer.Body=function(A){Roo.mailer.Body.superclass.constructor.call(this,A);var B=Roo.get(document.body);B.attr({leftmargin:0,marginwidth:0,topmargin:0,marginheight:0,offset:0});this.onRender(B);};Roo.extend(Roo.mailer.Body,Roo.bootstrap.Component,{cls:'',getAutoCreate:function(){var A={tag:'center',cn:[{tag:'table',border:0,cellpadding:0,cellspacing:0,height:'100%',align:'center',cls:'roo-m-body-table '+this.cls,cn:[{tag:'tr',cn:[{tag:'td',align:'center',valight:'top',cls:'roo-m-body-cell'}]}]}]};return A;},getChildContainer:function(){return this.el.select('.roo-m-body-cell').first();}}); +Roo.mailer=Roo.mailer||{};_calls=0;Roo.mailer.Body=function(A){Roo.mailer.Body.superclass.constructor.call(this,A);var B=Roo.get(document.body);B.attr({leftmargin:0,marginwidth:0,topmargin:0,marginheight:0,offset:0});_calls++;if(_calls>1){throw "test";} +this.onRender(B);this.onRender=function(){};};Roo.extend(Roo.mailer.Body,Roo.bootstrap.Component,{cls:'',getAutoCreate:function(){var A={tag:'center',cn:[{tag:'table',border:0,cellpadding:0,cellspacing:0,height:'100%',align:'center',cls:'roo-m-body-table '+this.cls,cn:[{tag:'tr',cn:[{tag:'td',align:'center',valight:'top',cls:'roo-m-body-cell'}]}]}]};return A;},getChildContainer:function(){return this.el.select('.roo-m-body-cell').first();},addxtype:function(A,B){this.addxtypeChild(A,B);}}); //Roo/mailer/Block.js Roo.mailer.Block=function(A){Roo.mailer.Block.superclass.constructor.call(this,A);};Roo.extend(Roo.mailer.Block,Roo.bootstrap.Component,{cls:'',html:'',blocktype:'header',getAutoCreate:function(){var tr={tag:'tr',cls:'roo-m-block-tr'};if(this.blocktype!='row'){tr.cn=[{tag:'td',align:'center',valight:'top',cls:'roo-m-'+this.blocktype+'-content',html:this.html}]}var cfg={tag:'table',border:0,cellpadding:0,cellspacing:0,width:'100%',align:'center',cls:'roo-m-'+this.blocktype+' '+this.cls,cn:[tr]};return cfg;},getChildContainer:function(A){if(this.blocktype=='row'&&A){var B=this.el.select('.roo-m-block-tr',true).first();return B.createChild({tag:'td',align:'center',valign:'top',style:'padding-top : 20px;',cls:'roo-m-row'});}return this.el.select('.roo-m-'+this.blocktype+'-content',true).first();}}); //Roo/mailer/BodyContainer.js -- 2.39.2