X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/0a6a36623855afe6f0a543115d6aa59916580b8f..3bbf65058e31f0a2cc0803fa695f9d4663a53c65:/HTML/php/Tabla.php diff --git a/HTML/php/Tabla.php b/HTML/php/Tabla.php index b38345a..d028cd6 100644 --- a/HTML/php/Tabla.php +++ b/HTML/php/Tabla.php @@ -44,6 +44,13 @@ class Tabla extends HTML_Table { * @var Object HTML_Table */ var $_tabla; + + /** + * Atributos de las tablas. + * + * @var array + */ + var $_atribTabla; /** * Constructor. @@ -61,15 +68,27 @@ class Tabla extends HTML_Table { { $this->_conf = include 'Tabla/conf_Tabla.php'; // Obtengo los valores particulares de configuracion // Seteo los atributos para la tabla - if (!strcmp($atributos,'')) { - $atributos = $this->_conf['atributos']['tabla_comun']; - } + $this->_atribTabla = $this->_parseAttributes($this->_conf['atributos']['tabla_comun']); //Genero el objeto HTML_Table - $this->HTML_Table($atributos); + if ($atributos != '') { + $tmp = $this->_parseAttributes($atributos); + if (isset($tmp['width'])) { + $this->_atribTabla['width'] = $tmp['width']; + } + if (isset($tmp['bgcolor'])) { + $this->_atribTabla['bgcolor'] = $tmp['bgcolor']; + } + if (isset($tmp['cellspacing'])) { + $this->_atribTabla['cellspacing'] = $tmp['cellspacing']; + } + if (isset($tmp['cellpadding'])) { + $this->_atribTabla['cellpadding'] = $tmp['cellpadding']; + } + } + $this->HTML_Table($this->_atribTabla); //Modifico los atributos de todas las tablas //Hay que encontrar o hacer una funcion que setee los atributos para las futuras //inserciones. - // $this->setAllAttributes($this->_conf['atributos']['celda_comun']); } /** @@ -214,7 +233,9 @@ class Tabla extends HTML_Table { { // Agregar la tabla de fondo. if ($doble == 0 ) { - $tabla_externa = new HTML_Table($this->_conf['atributos']['tabla_contenedora']); + $tmp = $this->_parseAttributes($this->_conf['atributos']['tabla_contenedora']); + $tmp['width'] = $this->_atribTabla['width']; + $tabla_externa = new HTML_Table($tmp); $tabla_externa->setCellContents(0,0,parent::toHtml(),$this->_conf['atributos']['celda_comun']); $result = $tabla_externa->toHtml(); }