X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/4bc3d716b5960b852b9b66d2aca640b59910410b..baf33b39fcddb95d9289abd6b0529f2bffc89687:/HTML/php/Tabla.php?ds=inline diff --git a/HTML/php/Tabla.php b/HTML/php/Tabla.php index c348232..30ab34a 100644 --- a/HTML/php/Tabla.php +++ b/HTML/php/Tabla.php @@ -263,7 +263,8 @@ class Tabla extends HTML_Table { $tmp = $this->_parseAttributes($this->_conf['atributos']['tabla_contenedora']); $tmp['width'] = $this->_attrs['width']; $tabla_externa = new HTML_Table($tmp); - $tabla_externa->setCellContents(0,0,parent::toHtml(),$this->_conf['atributos']['celda_comun']); + $tabla_externa->setCellContents(0, 0, parent::toHtml()); + $tabla_externa->setCellAttributes(0, 0, $this->_conf['atributos']['celda_comun']); $result = $tabla_externa->toHtml(); } else { @@ -346,8 +347,9 @@ class Tabla extends HTML_Table { if (is_string($attrs)) { $attrs = $this->_parseAttributes($attrs); } - $rta = ''; - $sin_estilo = true; + #$rta = array(); + $rta = $this->_conf['atributos']['celda_comun']; + #$sin_estilo = true; foreach ($attrs as $attr => $val) { $attr = strtolower($attr); switch ($attr) { @@ -355,8 +357,8 @@ class Tabla extends HTML_Table { case 'comun': case 'cabecera': case 'titulo': - $sin_estilo = false; - $rta .= $this->_conf['atributos']["celda_$attr"]; + #$sin_estilo = false; + $rta = array_merge($rta, $this->_conf['atributos']["celda_$attr"]); break; case 'align': case 'valign': @@ -369,24 +371,24 @@ class Tabla extends HTML_Table { case 'border': case 'cellspacing': case 'cellpadding': - $rta .= "$attr=\"$val\""; + $rta[$attr] = $val; break; case 'spacing': case 'padding': - $rta .= "cell$attr=\"$val\""; + $rta["cell$attr"] = $val; break; case 'nowrap': case 'th': - $rta .= $attr; + $rta[$attr] = ''; break; default: trigger_error("No se permite setear el atributo $attr", E_USER_ERROR); } } // Si no tiene estilo, agrego estilo comun. - if ($sin_estilo) { - $rta .= $this->_conf['atributos']['celda_comun']; - } + #if ($sin_estilo) { + #$rta = $this->_conf['atributos']['celda_comun']; + #} return $rta; }