X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/cacc1525e7102dfef7964462a50e4ff13f02dcc6..43fecaabcd18019b0f550977631f031e4fb32f23:/lib/MECON/HTML/Tabla.php?ds=sidebyside diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index df56c44..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_comun']); - $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;