]> git.llucax.com Git - mecon/meconlib.git/commitdiff
BugFix en Marco
authorMartín Marrese <marrese@gmail.com>
Tue, 5 Aug 2003 14:33:18 +0000 (14:33 +0000)
committerMartín Marrese <marrese@gmail.com>
Tue, 5 Aug 2003 14:33:18 +0000 (14:33 +0000)
doc/Marco/uml/Marco.xmi
lib/MECON/Marco/Menu.php
lib/MECON/Marco/MenuHorizontal.php
lib/MECON/Marco/MenuOculto.php
lib/MECON/Marco/MenuPrincipal.php
test/Marco/prueba/conf/confSecciones.php
www/images/general_sistemas.gif
www/images/general_sistemas_f2.gif
www/images/general_sistemas_f3.gif

index bdc1fffe20a31df1bc62bfb0beb9c639c410f82c..b105df1517aa9e8aeeabd5a5b71510e8c71873a1 100644 (file)
@@ -9,7 +9,7 @@
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="216" documentation="" uniqueid="221" />
+  <docsettings viewid="216" documentation="" uniqueid="222" />
   <umlobjects>
    <UML:Class stereotype="" package="MECON" xmi.id="3" abstract="0" documentation="Clase encargada del manejo del Marco de los sistemas." name="MECON_Marco" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="26" type="void" abstract="0" documentation="Constructor. Recibe como parametro el path del archivo de configuracion" name="MECON_Marco" static="0" scope="200" >
@@ -82,6 +82,10 @@ Si es un objeto debe tener un metodo toHtml y opcionalmente puede tener un getCS
     </UML:Operation>
     <UML:Operation stereotype="" package="" xmi.id="143" type="string" abstract="0" documentation="Funcion que se encarga de devolver lo que se debe mostrar en pantalla" name="toHtml" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="151" type="string" abstract="0" documentation="Devuelve el html del menu que hay que mostrar en pantalla" name="menuToHtml" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="222" type="string" abstract="0" documentation="Devuelve un string con el encabezado de la seccion
+" name="armarEncabezado" static="0" scope="201" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="string" abstract="0" documentation="Titulo de la seccion" name="titulo" static="0" scope="200" />
+    </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="55" value="array()" type="array" abstract="0" documentation="Array con la configuracion de las secciones del sistema;." name="configuracion" static="0" scope="201" />
     <UML:Attribute stereotype="" package="" xmi.id="133" value="array()" type="array" abstract="0" documentation="Array de array con los componentes del menu" name="componentes" static="0" scope="201" />
     <UML:Attribute stereotype="" package="" xmi.id="142" value="" type="table" abstract="0" documentation="Variable que contiene la tabla general de menues que se va a mostrar en pantalla" name="tabla" static="0" scope="201" />
@@ -200,7 +204,7 @@ x2c:include: HTML/Page.php" name="HTML_Page" static="0" scope="200" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="213" showattsigs="601" usesdiagramusefillcolour="0" x="3" linecolour="#ff0000" y="19" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="44" usefillcolor="1" showattributes="1" xmi.id="9" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="144" showattsigs="601" usesdiagramusefillcolour="0" x="239" linecolour="#ff0000" y="17" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showattributes="1" xmi.id="10" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="711" showattsigs="601" usesdiagramusefillcolour="0" x="31" linecolour="#ff0000" y="773" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="121" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="243" showattsigs="601" usesdiagramusefillcolour="0" x="371" linecolour="#ff0000" y="302" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="176" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="243" showattsigs="601" usesdiagramusefillcolour="0" x="371" linecolour="#ff0000" y="302" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="187" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="289" showattsigs="601" usesdiagramusefillcolour="0" x="21" linecolour="#ff0000" y="365" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="154" usefillcolor="1" showattributes="1" xmi.id="16" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="123" showattsigs="601" usesdiagramusefillcolour="0" x="541" linecolour="#ff0000" y="21" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showattributes="1" xmi.id="13" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="64" showattsigs="601" usesdiagramusefillcolour="0" x="689" linecolour="#ff0000" y="69" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="21" usefillcolor="1" showattributes="1" xmi.id="92" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
@@ -250,37 +254,37 @@ x2c:include: HTML/Page.php" name="HTML_Page" static="0" scope="200" />
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="14" widgetaid="100" documentation="" type="500" >
       <linepath>
        <startpoint startx="667" starty="542" />
-       <endpoint endx="533" endy="478" />
+       <endpoint endx="533" endy="489" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="14" widgetaid="103" documentation="" type="500" >
       <linepath>
        <startpoint startx="781" starty="388" />
-       <endpoint endx="614" endy="360" />
+       <endpoint endx="614" endy="364" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="3" indexb="1" widgetbid="14" widgetaid="16" documentation="" type="501" >
       <linepath>
        <startpoint startx="117" starty="365" />
-       <endpoint endx="371" endy="360" />
+       <endpoint endx="371" endy="364" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="3" indexb="2" widgetbid="16" widgetaid="14" documentation="" type="501" >
       <linepath>
-       <startpoint startx="371" starty="419" />
+       <startpoint startx="371" starty="426" />
        <endpoint endx="213" endy="365" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="3" indexb="1" widgetbid="14" widgetaid="17" documentation="" type="501" >
       <linepath>
        <startpoint startx="505" starty="773" />
-       <endpoint endx="452" endy="478" />
+       <endpoint endx="452" endy="489" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="14" widgetaid="136" documentation="" type="500" >
       <linepath>
        <startpoint startx="784" starty="469" />
-       <endpoint endx="614" endy="419" />
+       <endpoint endx="614" endy="426" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="100" widgetaid="193" documentation="" type="500" >
@@ -335,7 +339,7 @@ x2c:include: HTML/Page.php" name="HTML_Page" static="0" scope="200" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="213" showattsigs="601" usesdiagramusefillcolour="0" x="380" linecolour="#ff0000" y="10" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="44" usefillcolor="1" showattributes="1" xmi.id="9" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="711" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="530" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="121" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="355" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="143" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="243" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="170" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="176" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="243" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="170" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="187" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="268" showattsigs="601" usesdiagramusefillcolour="0" x="270" linecolour="#ff0000" y="270" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="27" usefillcolor="1" showattributes="1" xmi.id="100" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="268" showattsigs="601" usesdiagramusefillcolour="0" x="270" linecolour="#ff0000" y="310" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="27" usefillcolor="1" showattributes="1" xmi.id="136" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="254" showattsigs="601" usesdiagramusefillcolour="0" x="270" linecolour="#ff0000" y="170" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="44" usefillcolor="1" showattributes="1" xmi.id="193" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,6,-1,0,50,0,0,0,0,0" />
@@ -388,6 +392,7 @@ x2c:include: HTML/Page.php" name="HTML_Page" static="0" scope="200" />
        <listitem open="0" type="814" id="133" label="componentes" />
        <listitem open="0" type="814" id="203" label="componentesVertical" />
        <listitem open="0" type="814" id="55" label="configuracion" />
+       <listitem open="0" type="815" id="222" label="armarEncabezado" />
        <listitem open="0" type="815" id="57" label="generarArchivo" />
        <listitem open="0" type="815" id="56" label="MECON_Marco_Menu" />
        <listitem open="0" type="815" id="151" label="menuToHtml" />
index 116922a365c7e045839e7265788531f6b5a8b461..4ffe45882b2da8f989f7f79eaa376bd0697d83df 100644 (file)
@@ -106,6 +106,9 @@ class MECON_Marco_Menu {
                                         cellspacing="0" 
                                         cellpadding="0" 
                                         border="0"');
+        $this->_tabla->setLineEnd('');
+        $this->_tabla->setTab('');
+        
         $this->_configuracion = $configuracion;
     }
     // -X2C
@@ -280,6 +283,21 @@ class MECON_Marco_Menu {
     }
     // -X2C
 
+    // +X2C Operation 222
+    /**
+     * Devuelve un string con el encabezado de la seccion
+     *
+     * @param  string $titulo Titulo de la seccion
+     *
+     * @return string
+     * @access private
+     */
+    function _armarEncabezado($titulo) // ~X2C
+    {
+        return '<font face="Arial, Helvetica, sans-serif" size="3" color="#336699"><b>'.$titulo.'</b></font>';
+    }
+    // -X2C
+
 } // -X2C Class :MECON_Marco_Menu
 
 ?>
\ No newline at end of file
index 3e54f9e8dfbd6d4a48f7256adf10d6bb45153ddf..334770e8008173a6e50fa51ce4a42289dd575e04 100644 (file)
@@ -56,9 +56,10 @@ class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu {
     {
         $c = count($this->_componentes); 
         //Agrego el titulo
-        $tit = '<font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>'.$titulo.'</b></font>';
-        $row = array ($tit);
-        $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$c.'"');
+        $row = array ($this->_armarEncabezado($titulo));
+        $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"');
+        $imagen = new HTML_Image('/MECON/images/general_linea2.gif', 'boder="0" align="center"');
+        $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$c.'"');
         //
         $tmp = $this->_componentes;
         $this->_componentes = array ();
index 6d775882363ac9e7bd0c3667c45c2aa759cf69b3..c960e22e3621d3ad0fdbedb7594ed8a5a6e7b48e 100644 (file)
@@ -59,10 +59,11 @@ class MECON_Marco_MenuOculto extends MECON_Marco_Menu {
         }
         
         //Agrego el titulo
-        $tit = '<font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>'.$titulo.'</b></font>';
-        $row = array ($tit);
-        $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$colspan.'"');
-        
+        $row = array ($this->_armarEncabezado($titulo));
+        $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']) {
             $row = array ('&nbsp;');
index ce7cbebc82675e70711163696b6d8651672c36ff..6bccb5c168f9995c73046de89c5e076ee0f076d4 100644 (file)
@@ -1,4 +1,4 @@
-<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
+<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4:
 -------------------------------------------------------------------------------
                              Ministerio de Economía
                                     meconlib
@@ -25,6 +25,7 @@ $Id$
 -----------------------------------------------------------------------------*/
 
 require_once 'HTML/Table.php';
+require_once 'HTML/Image.php';
 
 // +X2C includes
 require_once 'MECON/Marco/MenuHorizontal.php';
@@ -92,13 +93,16 @@ class MECON_Marco_MenuPrincipal extends MECON_Marco_MenuHorizontal {
         
         //Agrego las secciones    
         $this->_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 ('<font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>'.$this->_seccionSeleccionada->_nombre.'</b></font>');
-            $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']) {
index 62d16f96276e879be88c0c0193cba85bc09b86a9..c418382fc2508829a57430b53f2d81562410124e 100644 (file)
@@ -60,7 +60,7 @@
                     'imagenMouseOn' => '',              //
                     'imagenSelect'  => '',              //
                     'link'          => 'usuarios',      //LINK DE LA SECCION
-                    'tipoMenu'      => 'vertical',      //TIPO DEL MENU DE HIJOS (vertical, horizontal, oculto)
+                    'tipoMenu'      => 'horizontal',      //TIPO DEL MENU DE HIJOS (vertical, horizontal, oculto)
                     'hijos'         =>  array (         //HIJOS PARA EL MENU
                                             array ( 'nombre'        => 'Filtrar Usuario',   //NOMBRE DEL HIJO 1
                                                     'imagenComun'   => 'usuarios-filtrar.gif',   //IMAGEN COMUN
@@ -93,7 +93,7 @@
                     'imagenSelect'  => '',              //
                     'link'          => 'perfiles',      //LINK DE LA SECCION
                     'tipoMenu'      => 'vertical',      //TIPO DEL MENU DE HIJOS (vertical, horizontal, oculto)
-/*                    'hijos'         =>  array (         //HIJOS PARA EL MENU
+                    'hijos'         =>  array (         //HIJOS PARA EL MENU
                                             array ( 'nombre'        => 'Perfiles - Hijo',   //NOMBRE DEL HIJO 1
                                                     'imagenComun'   => 'perfiles-nionio.gif',   //IMAGEN COMUN
                                                     'imagenMouseOn' => '',                  //
                                                     'link'          => 'perfiles-hijo',     //LINK DEL HIJO
                                             ),
                                         ),
-*/
+
                 ),
                 // }}} FIN SECCION 2 
         ),
index 2eb7ec95531e4c53498f8c22430d5d5432770a25..15f40cac41d16265d852d9df69af855f4a351225 100644 (file)
Binary files a/www/images/general_sistemas.gif and b/www/images/general_sistemas.gif differ
index afef99dc355cd52f24555e675c4d3ef99309eec3..c3b1668a8d5339aaf4341d8f44a5701405f9ac24 100644 (file)
Binary files a/www/images/general_sistemas_f2.gif and b/www/images/general_sistemas_f2.gif differ
index b80f3fa8fe3b660c05d89f68a952052e77945c63..f122f06ed9862cef89bd88b71c2487f9057866ff 100644 (file)
Binary files a/www/images/general_sistemas_f3.gif and b/www/images/general_sistemas_f3.gif differ