}
// this lot should be simplifed...
+ var _t = this;
+ var cp = [
+ 'align',
+ 'bgcolor',
+ 'border',
+ 'cellpadding',
+ 'cellspacing',
+ 'frame',
+ 'rules',
+ 'sortable',
+ 'summary',
+ 'width'
+ ].forEach(function(k) {
+ if (t[k]) {
+ cfg[k] = t[k];
+ }
+ });
+
- if (this.align) {
- cfg.align=this.align;
- }
- if (this.bgcolor) {
- cfg.bgcolor=this.bgcolor;
- }
- if (this.border) {
- cfg.border=this.border;
- }
- if (this.cellpadding) {
- cfg.cellpadding=this.cellpadding;
- }
- if (this.cellspacing) {
- cfg.cellspacing=this.cellspacing;
- }
- if (this.frame) {
- cfg.frame=this.frame;
- }
- if (this.rules) {
- cfg.rules=this.rules;
- }
- if (this.sortable) {
- cfg.sortable=this.sortable;
- }
- if (this.summary) {
- cfg.summary=this.summary;
- }
- if (this.width) {
- cfg.width=this.width;
- }
if (this.layout) {
cfg.style = (typeof(cfg.style) == 'undefined') ? ('table-layout:' + this.layout + ';') : (cfg.style + ('table-layout:' + this.layout + ';'));
}
if(typeof(config.align) != 'undefined' && config.align.length){
td.style += ' text-align:' + config.align + ';';
}
+ if(typeof(config.valign) != 'undefined' && config.valign.length){
+ td.style += ' vertical-align:' + config.valign + ';';
+ }
if(typeof(config.width) != 'undefined'){
td.style += ' width:' + config.width + 'px;';