X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/84f4d19441dd0a757010a623b50cfe1b0c553f3b..22707ebc146f25250340ea1688533309ede8e87e:/lib/MECON/HTML/Tabla.php diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index f764ba9..d67711c 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,15 +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']); - $tabla_externa = new HTML_Table(array('width' => '100%')); - $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; @@ -369,13 +376,13 @@ class Tabla extends HTML_Table { case 'border': case 'cellspacing': case 'cellpadding': + case 'nowrap': $rta[$attr] = $val; break; case 'spacing': case 'padding': $rta["cell$attr"] = $val; break; - case 'nowrap': case 'th': $rta[$attr] = ''; break;