X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1572e58df94bc9e57f4cb000fe097a0b969047f7..a8ec5b00eeb26d6211f01647698c003d62996aa6:/lib/MECON/HTML/Tabla.php diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index 3f31b1b..ca72590 100644 --- a/lib/MECON/HTML/Tabla.php +++ b/lib/MECON/HTML/Tabla.php @@ -1,22 +1,28 @@ - | -// +--------------------------------------------------------------------+ -// -// $Id$ -// -// $URL$ -// $Rev$ -// $Date$ -// $Author$ + +------------------------------------------------------------------------------- +$Id$ +-----------------------------------------------------------------------------*/ require_once 'HTML/Table.php'; @@ -59,7 +65,7 @@ class Tabla extends HTML_Table { */ function Tabla($attrs = null) { - $this->_conf = include 'Tabla/conf_Tabla.php'; // Obtengo los valores particulares de configuracion + $this->_conf = include 'MECON/HTML/Tabla/conf_Tabla.php'; // Obtengo los valores particulares de configuracion // Seteo los atributos para la tabla $this->_attrs = $this->_conf['atributos']['tabla_comun']; //Genero el objeto HTML_Table @@ -258,16 +264,16 @@ class Tabla extends HTML_Table { function toHtml($simple = 0) { // Agregar la tabla de fondo. - if ($simple == 0) { - $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()); - $tabla_externa->setCellAttributes(0, 0, $this->_conf['atributos']['celda_contenedora']); - $result = $tabla_externa->toHtml(); - } - else { + if ($simple) { $result = parent::toHtml(); + } else { + $contenedora = $this->_conf['atributos']['tabla_contenedora']; + $contenedora['width'] = $this->getAttribute('width'); + $this->updateAttributes(array('width' => '100%')); + $tabla_externa = new HTML_Table($contenedora); + $tabla_externa->addRow(array(parent::toHtml()), + $this->_conf['atributos']['celda_contenedora']); + $result = $tabla_externa->toHtml(); } return $result;