X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1572e58df94bc9e57f4cb000fe097a0b969047f7..387525736846a1dad72e99ccf416708ff811c92c:/lib/MECON/HTML/Tabla.php?ds=inline diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index 3f31b1b..f9f48a4 100644 --- a/lib/MECON/HTML/Tabla.php +++ b/lib/MECON/HTML/Tabla.php @@ -59,7 +59,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 +258,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;