X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/6a10967bfaa5f6fc91beff67c4419f1a3c9b29c8..6633d763d3bc4797857a2b62ccad3a90f765da9f:/lib/MECON/Marco/MenuPrincipal.php?ds=inline diff --git a/lib/MECON/Marco/MenuPrincipal.php b/lib/MECON/Marco/MenuPrincipal.php index eedc3c3..1aa3732 100644 --- a/lib/MECON/Marco/MenuPrincipal.php +++ b/lib/MECON/Marco/MenuPrincipal.php @@ -113,14 +113,6 @@ class MenuPrincipal extends MenuHorizontal { $row = array (''.$this->_seccionSeleccionada->_nombre.''); $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$colspan.'"'); - if ($body['menuVertical']) { - $cols = 2; - } - else { - $cols = 1; - } - - $tabla = new HTML_Table (array('width' => '100%', 'border' => 0, 'celspacing' => 0, 'celpadding' => 0)); //Agrego si corresponde el espacio al inicio if ($body['espacios']) { $espacio = ' 
'; @@ -129,18 +121,18 @@ class MenuPrincipal extends MenuHorizontal { $espacio = ''; } // + +//SI HAY MENU ARMO UNA TABLA, SINO TIRO DIRECTAMENTE $row = array(); $tmp = ''; if ($body['menuVertical']) { if (is_object($body['menuVertical'])) { if (method_exists($body['menuVertical'],'toHtml')) { $tmp.=$body['menuVertical']->toHtml(); - } - else { + } else { trigger_error('El metodo no existe!', E_USER_WARNING); } - } - else { + } else { $tmp.=$body['menuVertical']; } $row[] = $tmp; @@ -153,24 +145,29 @@ class MenuPrincipal extends MenuHorizontal { if (is_object($bod)) { if (method_exists($bod,'toHtml')) { $tmp.=$bod->toHtml(); - } - else { + } else { trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING); } - } - else { + } else { $tmp.=$bod; } } $tmp.= $espacio; $row[] = $tmp; - } - else { + } else { $row[] = $body['body']; } - $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'); - $tabla->updateCellAttributes($tt, 0, 'valign="top" width="1%"'); - $this->_tabla->addRow(array($tabla->toHtml()),'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); + + if ($body['menuVertical']) { + $tabla = new HTML_Table (array('width' => '760', 'border' => 0, 'celspacing' => 0, 'celpadding' => 0)); + $tt = $tabla->addRow($row,'align="center" bgcolor="#FFFFFF"'); + $tabla->updateCellAttributes($tt, 0, 'valign="top" width="1%"'); + $contenido[] = $tabla; + } else { + $contenido = $row; + } +// + $this->_tabla->addRow($contenido,'align="center" bgcolor="#FFFFFF" colspan="'.$colspan.'"'); } $row = array ($body['pie']);