X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/8a7c41689e3915b23a5e0a59a4e849289a287438..58890a698f770e368aedf137df241bc01041e62e:/lib/MECON/Marco/MenuPrincipal.php?ds=sidebyside diff --git a/lib/MECON/Marco/MenuPrincipal.php b/lib/MECON/Marco/MenuPrincipal.php index b443261..db96650 100644 --- a/lib/MECON/Marco/MenuPrincipal.php +++ b/lib/MECON/Marco/MenuPrincipal.php @@ -1,4 +1,4 @@ -_tabla->addRow($this->_componentes,'align="center" bgcolor="#CCCCCC"'); - $colcount = $this->_tabla->getColCount(); - $width = 100 / $colcount; + $width = intval (100 / $colspan); - for ($col=0; $col < $colcount; $col++) { - $this->_tabla->updateColAttributes($col,'width="'.$width.'%"'); - } + for ($col=0; $col < $colspan; $col++) { + $this->_tabla->updateCellAttributes(1,$col,'width="'.$width.'%"'); + } + $imagen = new HTML_Image('/MECON/images/general_linea.gif'); + $i = $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$colspan.'"'); + $this->_tabla->updateRowAttributes($i, 'height="1"'); + foreach ($this->_secciones as $sec) { if ($sec->verifSeccionSeleccionada($_SERVER['PHP_SELF'])) { $this->_seccionSeleccionada = $sec; @@ -111,8 +115,12 @@ class MECON_Marco_MenuPrincipal extends MECON_Marco_MenuHorizontal { $this->_tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); } else { - $row = array (''.$this->_seccionSeleccionada->_nombre.''); - $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$colspan.'"'); + if ($this->_seccionSeleccionada) { + $row = array ($this->_armarEncabezado($this->_seccionSeleccionada->_nombre)); + $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); + $imagen = new HTML_Image('/MECON/images/general_linea2.gif', 'boder="0" align="center"'); + $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$colspan.'"'); + } //Agrego si corresponde el espacio al inicio if ($this->_configuracion['espacios']) { @@ -147,7 +155,7 @@ class MECON_Marco_MenuPrincipal extends MECON_Marco_MenuHorizontal { if (method_exists($bod,'toHtml')) { $tmp.=$bod->toHtml(); } else { - trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING); + trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING); } } else { $tmp.=$bod; @@ -161,15 +169,14 @@ class MECON_Marco_MenuPrincipal extends MECON_Marco_MenuHorizontal { if ($body['menuVertical']) { $tabla = new HTML_Table (array('width' => '760', 'border' => 0, 'celspacing' => 0, 'celpadding' => 0)); - $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF"'); + $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF" valign="top"'); $tabla->updateCellAttributes($tt, 0, 'valign="top" width="1%"'); $contenido[] = $tabla; } else { $contenido = $row; } // - $this->_tabla->addRow($contenido,'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); - + $this->_tabla->addRow($contenido,'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'" valign="top"'); } } // -X2C