From af6c2656b4ea662ac1707f7fcd8a1d735dd717d8 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Tue, 1 Jul 2003 22:30:37 +0000 Subject: [PATCH 01/16] Se arregla el ejemplo y el mdate para necesitar menos parametros. --- lib/MECON/HTML/QuickForm/mdate.php | 8 ++++---- test/HTML/prueba_html_quickform_renderer_tabla.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index f0886f9..6e47cb7 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -25,8 +25,6 @@ // $Rev$ // - - require_once 'HTML/QuickForm/date.php'; require_once 'Date.php'; require_once 'Validate.php'; @@ -60,7 +58,9 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date ) ); - parent::HTML_QuickForm_date($elementName, $elementLabel, $options, $attributes); + parent::HTML_QuickForm_date($elementName, $elementLabel, + array_merge(array('language'=>'es','format'=>'d F Y'), $options), + $attributes); } //end constructor // }}} @@ -99,7 +99,7 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date */ function &getValue() { - if ($this->_selectedDate['Y'] != 00) { + if ($this->_selectedDate['Y']) { return new Date (sprintf("%04d-%02d-%02d 00:00:00",$this->_selectedDate['Y'],$this->_selectedDate['F'],$this->_selectedDate['d'])); } else { diff --git a/test/HTML/prueba_html_quickform_renderer_tabla.php b/test/HTML/prueba_html_quickform_renderer_tabla.php index 1000323..528489a 100644 --- a/test/HTML/prueba_html_quickform_renderer_tabla.php +++ b/test/HTML/prueba_html_quickform_renderer_tabla.php @@ -16,7 +16,7 @@ $form->addElement('text', 'nombre_sistema', 'Nombre', array('size' => '30')); $form->addElement('textarea', 'desc_sistema', 'Descripción', array('rows' => '2','cols'=>'50')); $form->addElement('textarea', 'contacto', 'Contacto', array('rows' => '2','cols'=>'50')); - $form->addElement('mdate', 'fecha', 'Fecha Implementación', array('language'=>'es','format'=>'d F Y')); + $form->addElement('mdate', 'fecha', 'Fecha Implementación'); // Agrego un grupo de prueba separado por
s. $grupo = array(); $grupo[] =& HTML_QuickForm::createElement('mdate', 'desde', 'Desde', array('language'=>'es','format'=>'d F Y')); @@ -47,9 +47,9 @@ $form->addRule('nombre_sistema', 'El campo nombre debe ser numerico', 'numeric', '', 'client'); $form->addRule('desc_sistema', 'El campo descripcion es obligatorio', 'required', '', 'client'); $form->addRule('contacto', 'El campo contacto es obligatorio', 'required', '', 'client'); - $form->addRule('fecha', 'El campo desde no es obligatorio', 'fecha', '', 'client'); - $form->addRule('desde', 'El campo desde no es obligatorio', 'fecha', '', 'client'); - $form->addRule('hasta', 'El campo desde no es obligatorio', 'fecha', '', 'client'); + $form->addRule('fecha', 'La fecha no es válida', 'fecha', '', 'client'); + $form->addRule('desde', 'La fecha no es válida', 'fecha', '', 'client'); + $form->addRule('hasta', 'La fecha no es válida', 'fecha', '', 'client'); $form->addRule('fecha', 'El campo desde no es obligatorio', 'required', '', 'client'); // Cambia el formulario dependiendo de la accion que se quiera tomar. -- 2.43.0 From e8daf40272024bef9a449b5d6ae8475181ef2b5f Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Tue, 1 Jul 2003 22:31:43 +0000 Subject: [PATCH 02/16] Se actualiza Seccion que habia quedado sin actualizar desde antes (de cuando se arreglo ImagenAnimada). --- lib/MECON/Marco/Seccion.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MECON/Marco/Seccion.php b/lib/MECON/Marco/Seccion.php index cb3e04d..f8bd7fb 100644 --- a/lib/MECON/Marco/Seccion.php +++ b/lib/MECON/Marco/Seccion.php @@ -125,7 +125,8 @@ class Seccion extends Pagina { if (array_key_exists('link', $seccion)) { parent::Pagina($seccion['link']); } - $this->_imagen = new ImagenAnimada($imgComun, $imgMouseOn, $imgSelect, $configuracion['directorios']['imagenes'], $this->_nombre, $this->_link); + $this->_imagen = new ImagenAnimada($imgComun, $imgMouseOn, $imgSelect, + $configuracion['directorios']['imagenes'], $this->_nombre, $configuracion['directorios']['root'].'/'.$this->_link); if (array_key_exists('tipoMenu', $seccion)) { $this->_tipoMenu = $seccion['tipoMenu']; -- 2.43.0 From 4074a55f24d59914f9d0738191fb3dfa3650bda1 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Tue, 1 Jul 2003 22:32:40 +0000 Subject: [PATCH 03/16] Se agregan imagenes generales del boton de sistemas. --- www/images/general_sistemas.gif | Bin 0 -> 874 bytes www/images/general_sistemas_f2.gif | Bin 0 -> 844 bytes www/images/general_sistemas_f3.gif | Bin 0 -> 1585 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 www/images/general_sistemas.gif create mode 100644 www/images/general_sistemas_f2.gif create mode 100644 www/images/general_sistemas_f3.gif diff --git a/www/images/general_sistemas.gif b/www/images/general_sistemas.gif new file mode 100644 index 0000000000000000000000000000000000000000..c1c344e918f152b3d1a12801f9c28e86d651ee9a GIT binary patch literal 874 zcmV-w1C{(oNk%w1VKo3V0K@4M3=9ka009000ssI2 z000000000000000A^8La6aX3kEC2ui05t$J000I5AR&%qX%2!A04xv$!eGvHU8`-b z!?NxFf)*@AEUs9BpYrq?7N5^%ZwYiYuh?uL^GZ@}L9IB;?S5&&)GL#zJSLMzg-xfg zpXXBenz2M0a19ZCb!>M;0A6_mU1|Xp4i*g#4h?=1g=HB=0aIU%jt>o^6cnQk51EIK z0eLD;uW$|&Y!nV~s#{PgXP}OCRzg{yc}jIghwlcklY7O9q+yD?PNFOZUymJtz> z6P6Oj$4b~+et_YF3=9sCsN_Z0yK8N4adR0Hv=kH6)#yR7mnnlNIS1tt@ni$Vz%2#a zfD@z;2d03YikV>R0K|2Ay5-IRh zs{xW!bE!>XAgfrTWzBkZ+ExjIx2*K0ZSZ2Q0R(62k`=5)E!MtE{z_d+xpL(cY!T-n zaA0fG&qdhU-Aq6-XwXi%6#0)cDTQ0k7RJpzI6*QXEr<~_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1c2b9f8199f530b1a7099 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Tue, 1 Jul 2003 22:51:55 +0000 Subject: [PATCH 04/16] Se sobreescribe addRule() y addGroupRule() para que validen en el cliente tambien por defecto. --- lib/MECON/HTML/QuickForm.php | 8 ++++++++ .../prueba_html_quickform_renderer_tabla.php | 20 +++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/MECON/HTML/QuickForm.php b/lib/MECON/HTML/QuickForm.php index 407e5c9..560ad60 100644 --- a/lib/MECON/HTML/QuickForm.php +++ b/lib/MECON/HTML/QuickForm.php @@ -40,6 +40,14 @@ class MECON_HTML_QuickForm extends HTML_QuickForm { $this->registerRule('fecha', 'function', 'validate', 'HTML_QuickForm_mdate'); $this->setRequiredNote('* indica un campo obligatorio'); } + function addRule($element, $message, $type, $format='', $validation='client', $reset = false, $force = false) + { + parent::addRule($element, $message, $type, $format, $validation, $reset, $force); + } + function addGroupRule($group, $arg1, $type='', $format='', $howmany=0, $validation = 'client') + { + parent::addGroupRule($group, $arg1, $type, $format, $howmany, $validation); + } } ?> diff --git a/test/HTML/prueba_html_quickform_renderer_tabla.php b/test/HTML/prueba_html_quickform_renderer_tabla.php index 528489a..e6e5117 100644 --- a/test/HTML/prueba_html_quickform_renderer_tabla.php +++ b/test/HTML/prueba_html_quickform_renderer_tabla.php @@ -19,8 +19,8 @@ $form->addElement('mdate', 'fecha', 'Fecha Implementación'); // Agrego un grupo de prueba separado por
s. $grupo = array(); - $grupo[] =& HTML_QuickForm::createElement('mdate', 'desde', 'Desde', array('language'=>'es','format'=>'d F Y')); - $grupo[] =& HTML_QuickForm::createElement('mdate', 'hasta', 'Hasta', array('language'=>'es','format'=>'d F Y')); + $grupo[] =& HTML_QuickForm::createElement('mdate', 'desde', 'Desde'); + $grupo[] =& HTML_QuickForm::createElement('mdate', 'hasta', 'Hasta'); $form->addGroup($grupo, 'fecha', 'Intervalo', '
', true); // Agrega otro groupo de prueba, separado por un espacio. $grupo = array(); @@ -43,14 +43,14 @@ $form->addGroup($grupo, 'botones'); // Agrega las reglas de validacion - $form->addRule('nombre_sistema', 'El campo nombre es obligatorio', 'required', '', 'client'); - $form->addRule('nombre_sistema', 'El campo nombre debe ser numerico', 'numeric', '', 'client'); - $form->addRule('desc_sistema', 'El campo descripcion es obligatorio', 'required', '', 'client'); - $form->addRule('contacto', 'El campo contacto es obligatorio', 'required', '', 'client'); - $form->addRule('fecha', 'La fecha no es válida', 'fecha', '', 'client'); - $form->addRule('desde', 'La fecha no es válida', 'fecha', '', 'client'); - $form->addRule('hasta', 'La fecha no es válida', 'fecha', '', 'client'); - $form->addRule('fecha', 'El campo desde no es obligatorio', 'required', '', 'client'); + $form->addRule('nombre_sistema', 'El campo nombre es obligatorio', 'required'); + $form->addRule('nombre_sistema', 'El campo nombre debe ser numerico', 'numeric'); + $form->addRule('desc_sistema', 'El campo descripcion es obligatorio', 'required'); + $form->addRule('contacto', 'El campo contacto es obligatorio', 'required'); + $form->addRule('fecha', 'La fecha no es válida', 'fecha'); + $form->addRule('desde', 'La fecha no es válida', 'fecha'); + $form->addRule('hasta', 'La fecha no es válida', 'fecha'); + $form->addRule('fecha', 'El campo desde no es obligatorio', 'required', ''); // Cambia el formulario dependiendo de la accion que se quiera tomar. if (@$_REQUEST['accion']) { -- 2.43.0 From d82e9dfc6789f8b37116774c734a619229e7c5b5 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Wed, 2 Jul 2003 15:40:01 +0000 Subject: [PATCH 05/16] Agrego el modelo que incluye a Agente y Dependencia --- doc/meconlib.xmi | 452 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 452 insertions(+) create mode 100644 doc/meconlib.xmi diff --git a/doc/meconlib.xmi b/doc/meconlib.xmi new file mode 100644 index 0000000..d0e85c0 --- /dev/null +++ b/doc/meconlib.xmi @@ -0,0 +1,452 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.43.0 From d19adf80c92c70fe0d770e81e7f07f2086d00a67 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 2 Jul 2003 18:23:27 +0000 Subject: [PATCH 06/16] Se arregla un bug del manejo de grupos. --- lib/MECON/HTML/QuickForm/Renderer/Tabla.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php index 5e04f71..ee3083c 100644 --- a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php +++ b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php @@ -88,7 +88,7 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { * * @access public */ - function HTML_QuickForm_Renderer_Tabla($style = 'width="400"') + function HTML_QuickForm_Renderer_Tabla($style = array('width' => '100%')) { $this->HTML_QuickForm_Renderer(); $this->_tabla =& new Tabla($style); @@ -258,6 +258,7 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { ); $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left', 'nowrap' => true)); } + $this->_inGroup = false; } // end func finishGroup } // end class HTML_QuickForm_Renderer_Default -- 2.43.0 From 759e135e1bb1e9573c8d4f5629c3533cc195403b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Sklar?= Date: Wed, 2 Jul 2003 18:42:09 +0000 Subject: [PATCH 07/16] Agregue los archivos de configuracion para el xmi2code de meconlib. --- doc/meconlib.xmi | 341 ++++++++----------------------------------- doc/xmi2code.config | 22 +++ doc/xmi2code.tpl.php | 27 ++++ 3 files changed, 110 insertions(+), 280 deletions(-) create mode 100644 doc/xmi2code.config create mode 100644 doc/xmi2code.tpl.php diff --git a/doc/meconlib.xmi b/doc/meconlib.xmi index d0e85c0..0d7b080 100644 --- a/doc/meconlib.xmi +++ b/doc/meconlib.xmi @@ -5,115 +5,17 @@ umbrello uml modeller http://uml.sf.net 1.1 - + +" uniqueid="150" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -121,177 +23,118 @@ Si se pasa como parametro un agente solo se devuelven los correspondientes a ese - - - - - - - - - - - - - - - - - + + - + + - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -299,22 +142,22 @@ promedia y guarda en base" font="Helvetica,11,-1,5,50,0,0,0,0,0" /> - - + + - - + + - - + + @@ -322,24 +165,24 @@ El proceso puede ser muy largo." font="Helvetica,11,-1,5,50,0,0,0,0,0" /> - - + + - - + + - - + + @@ -348,102 +191,40 @@ El proceso puede ser muy largo." font="Helvetica,11,-1,5,50,0,0,0,0,0" /> - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + diff --git a/doc/xmi2code.config b/doc/xmi2code.config new file mode 100644 index 0000000..54bc4da --- /dev/null +++ b/doc/xmi2code.config @@ -0,0 +1,22 @@ + + + diff --git a/doc/xmi2code.tpl.php b/doc/xmi2code.tpl.php new file mode 100644 index 0000000..521d350 --- /dev/null +++ b/doc/xmi2code.tpl.php @@ -0,0 +1,27 @@ + +// +----------------------------------------------------------------------+ +// +// $Id$ +// $Author$ +// $URL$ +// $Date$ +// $Rev$ +// + +@@system-base-include -- 2.43.0 From 84f4d19441dd0a757010a623b50cfe1b0c553f3b Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Wed, 2 Jul 2003 19:54:00 +0000 Subject: [PATCH 08/16] Se hace que MECON_HTML_QuickForm use por defecto el Renderer de Tabla. --- lib/MECON/HTML/QuickForm.php | 16 ++++++++++++++++ lib/MECON/HTML/QuickForm/Renderer/Tabla.php | 4 ++-- lib/MECON/HTML/Tabla.php | 3 +-- .../prueba_html_quickform_renderer_tabla.php | 7 ++----- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lib/MECON/HTML/QuickForm.php b/lib/MECON/HTML/QuickForm.php index 560ad60..7258df1 100644 --- a/lib/MECON/HTML/QuickForm.php +++ b/lib/MECON/HTML/QuickForm.php @@ -28,11 +28,13 @@ // require_once 'HTML/QuickForm.php'; +require_once 'MECON/HTML/QuickForm/Renderer/Tabla.php'; /** * QuickForm de uso general del MECON. */ class MECON_HTML_QuickForm extends HTML_QuickForm { + var $_rendererOpts = array(); function MECON_HTML_QuickForm($formName='', $method='post', $action='', $target='_self', $attributes=null) { parent::HTML_QuickForm($formName, $method, $action, $target, $attributes); @@ -48,6 +50,20 @@ class MECON_HTML_QuickForm extends HTML_QuickForm { { parent::addGroupRule($group, $arg1, $type, $format, $howmany, $validation); } + function toHtml() { + $renderer =& new MECON_HTML_QuickForm_Renderer_Tabla($this->_rendererOpts); + $this->accept($renderer); + return $renderer->toHtml(); + } + function setRendererOpts($opts) { + $this->_rendererOpts = $opts; + } + function getRendererOpts($opts) { + return $this->_rendererOpts;; + } + function updateRendererOpts($opts) { + $this->_rendererOpts = array_merge($this->_rendererOpts, $opts); + } } ?> diff --git a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php index ee3083c..2a82680 100644 --- a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php +++ b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php @@ -29,7 +29,7 @@ require_once 'MECON/HTML/Tabla.php'; * * @access public */ -class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { +class MECON_HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { /** * Tabla usada para dibujar el formulario. @@ -88,7 +88,7 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { * * @access public */ - function HTML_QuickForm_Renderer_Tabla($style = array('width' => '100%')) + function MECON_HTML_QuickForm_Renderer_Tabla($style = array()) { $this->HTML_QuickForm_Renderer(); $this->_tabla =& new Tabla($style); diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index 3f31b1b..f764ba9 100644 --- a/lib/MECON/HTML/Tabla.php +++ b/lib/MECON/HTML/Tabla.php @@ -260,8 +260,7 @@ class Tabla extends HTML_Table { // 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 = 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(); diff --git a/test/HTML/prueba_html_quickform_renderer_tabla.php b/test/HTML/prueba_html_quickform_renderer_tabla.php index e6e5117..7707dc0 100644 --- a/test/HTML/prueba_html_quickform_renderer_tabla.php +++ b/test/HTML/prueba_html_quickform_renderer_tabla.php @@ -1,13 +1,12 @@ Prueba de renderer - + accept($renderer); - echo $renderer->toHtml(); + echo $form->toHtml(); ?> -- 2.43.0 From 357d62d2e453ea7a0badba1bda7e57a686d9a5a5 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 2 Jul 2003 20:01:07 +0000 Subject: [PATCH 09/16] Se actualizan las imagenes. --- www/images/general_sistemas.gif | Bin 874 -> 886 bytes www/images/general_sistemas_f2.gif | Bin 844 -> 854 bytes www/images/general_sistemas_f3.gif | Bin 1585 -> 1599 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/www/images/general_sistemas.gif b/www/images/general_sistemas.gif index c1c344e918f152b3d1a12801f9c28e86d651ee9a..2eb7ec95531e4c53498f8c22430d5d5432770a25 100644 GIT binary patch delta 46 zcmaFG_Kl6x-P6s&GSQU5d?IHtqxr^KW+ukZlN*_y3OF&{e3|}c;|aCZIh=|N4AuZ^ CRS)$5 delta 34 qcmeyy_KJ;12X{up|flR RGywsQlc5ER1=$t|06SEWAr$}s -- 2.43.0 From 53848b32731bc645f2f59821ab0d8e300c86b290 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 2 Jul 2003 20:04:55 +0000 Subject: [PATCH 10/16] =?utf8?q?Se=20agregan=20m=C3=A1s=20bullets.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- www/images/general_v1.gif | Bin 0 -> 56 bytes www/images/general_v2.gif | Bin 0 -> 58 bytes www/images/general_v3.gif | Bin 0 -> 58 bytes www/images/general_v4.gif | Bin 79 -> 86 bytes www/images/general_v5.gif | Bin 0 -> 87 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 www/images/general_v1.gif create mode 100644 www/images/general_v2.gif create mode 100644 www/images/general_v3.gif create mode 100644 www/images/general_v5.gif diff --git a/www/images/general_v1.gif b/www/images/general_v1.gif new file mode 100644 index 0000000000000000000000000000000000000000..e868fd8f22d6c2e2a5b90f76047a02d242cf7fe4 GIT binary patch literal 56 zcmZ?wbhEHbWM|-FXkcJSV@Uh||G(l-7FH1kMg|=QAOOiQF!A^FbM9vQ?lgt(+UclU I%NZD~0fW^K00000 literal 0 HcmV?d00001 diff --git a/www/images/general_v2.gif b/www/images/general_v2.gif new file mode 100644 index 0000000000000000000000000000000000000000..f25b8a40d459d20aa3b70821f75e0f227e361f22 GIT binary patch literal 58 zcmZ?wbhEHb{=rx{*dQ)+o7YM^oON5dR(-{{w3oD9|g7D^e| literal 79 zcmZ?wbhEHbPx# diff --git a/www/images/general_v5.gif b/www/images/general_v5.gif new file mode 100644 index 0000000000000000000000000000000000000000..343655e8934bfdd53302a545bb650e9f69783169 GIT binary patch literal 87 zcmZ?wbhEHb Date: Wed, 2 Jul 2003 20:51:44 +0000 Subject: [PATCH 11/16] Se arreglan bugs. --- lib/MECON/HTML/QuickForm/Renderer/Tabla.php | 4 ++-- lib/MECON/HTML/Tabla.php | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php index 2a82680..7f7432e 100644 --- a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php +++ b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php @@ -250,11 +250,11 @@ class MECON_HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { $id = $this->_tabla->addRow( array(join('', $this->_groupElements)) ); - $this->_tabla->updateCellAttributes($id, 0, array('align' => 'right', 'colspan' => 2)); + $this->_tabla->updateCellAttributes($id, 0, array('valign' => 'middle', 'align' => 'right', 'colspan' => 2)); } else { $id = $this->_tabla->addRow( array($group->getLabel(), join($sep, $this->_groupElements)), - array('align' => 'left') + array('valign' => 'middle', 'align' => 'left') ); $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left', 'nowrap' => true)); } diff --git a/lib/MECON/HTML/Tabla.php b/lib/MECON/HTML/Tabla.php index f764ba9..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,15 +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']); - $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; -- 2.43.0 From 7149620fb3425eca10d54412c78794cc919e0dbb Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Wed, 2 Jul 2003 21:37:41 +0000 Subject: [PATCH 12/16] Se arreglan los bullets que eran del arbol. --- www/images/arbol_bullet_4.gif | Bin 0 -> 79 bytes www/images/{general_v5.gif => arbol_bullet_5.gif} | Bin www/images/general_v1.gif | Bin 56 -> 0 bytes www/images/general_v2.gif | Bin 58 -> 0 bytes www/images/general_v3.gif | Bin 58 -> 0 bytes www/images/general_v4.gif | Bin 86 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 www/images/arbol_bullet_4.gif rename www/images/{general_v5.gif => arbol_bullet_5.gif} (100%) delete mode 100644 www/images/general_v1.gif delete mode 100644 www/images/general_v2.gif delete mode 100644 www/images/general_v3.gif delete mode 100644 www/images/general_v4.gif diff --git a/www/images/arbol_bullet_4.gif b/www/images/arbol_bullet_4.gif new file mode 100644 index 0000000000000000000000000000000000000000..33f0eb5a4a3616f029c2c923df27a8482607dca8 GIT binary patch literal 79 zcmZ?wbhEHbPx# literal 0 HcmV?d00001 diff --git a/www/images/general_v5.gif b/www/images/arbol_bullet_5.gif similarity index 100% rename from www/images/general_v5.gif rename to www/images/arbol_bullet_5.gif diff --git a/www/images/general_v1.gif b/www/images/general_v1.gif deleted file mode 100644 index e868fd8f22d6c2e2a5b90f76047a02d242cf7fe4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56 zcmZ?wbhEHbWM|-FXkcJSV@Uh||G(l-7FH1kMg|=QAOOiQF!A^FbM9vQ?lgt(+UclU I%NZD~0fW^K00000 diff --git a/www/images/general_v2.gif b/www/images/general_v2.gif deleted file mode 100644 index f25b8a40d459d20aa3b70821f75e0f227e361f22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 58 zcmZ?wbhEHb{=rx{*dQ)+o7YM^oON5dR(-{{w3oD9|g7D^e| -- 2.43.0 From cf3ecc87d6a327afdb468c29f890d317b3d99f07 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 2 Jul 2003 22:51:07 +0000 Subject: [PATCH 13/16] Se corrige un bugcito. --- lib/MECON/HTML/Arbol.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MECON/HTML/Arbol.php b/lib/MECON/HTML/Arbol.php index 5cc2660..bca4d58 100644 --- a/lib/MECON/HTML/Arbol.php +++ b/lib/MECON/HTML/Arbol.php @@ -28,7 +28,7 @@ class HTML_Arbol extends HTML_Table $bullets = array('', '/MECON/images/arbol_bullet_1.gif', '/MECON/images/arbol_bullet_2.gif', - '/MECON/images/arbol_bullet3.gif'); + '/MECON/images/arbol_bullet_3.gif'); $tabulados = array(0, 7, 13, 20); $classes = array('menu', 'menu1', 'menu1', 'menu2'); $imagen = ' Date: Wed, 2 Jul 2003 22:56:45 +0000 Subject: [PATCH 14/16] Se corrigen bugs. --- test/HTML/prueba_html_quickform_renderer_tabla.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/HTML/prueba_html_quickform_renderer_tabla.php b/test/HTML/prueba_html_quickform_renderer_tabla.php index 7707dc0..cc8ad08 100644 --- a/test/HTML/prueba_html_quickform_renderer_tabla.php +++ b/test/HTML/prueba_html_quickform_renderer_tabla.php @@ -20,7 +20,7 @@ $grupo = array(); $grupo[] =& HTML_QuickForm::createElement('mdate', 'desde', 'Desde'); $grupo[] =& HTML_QuickForm::createElement('mdate', 'hasta', 'Hasta'); - $form->addGroup($grupo, 'fecha', 'Intervalo', '
', true); + $form->addGroup($grupo, 'fechas', 'Intervalo', '
', true); // Agrega otro groupo de prueba, separado por un espacio. $grupo = array(); $grupo[] =& HTML_QuickForm::createElement('checkbox', 'op1', 'Pelele'); @@ -49,7 +49,7 @@ $form->addRule('fecha', 'La fecha no es válida', 'fecha'); $form->addRule('desde', 'La fecha no es válida', 'fecha'); $form->addRule('hasta', 'La fecha no es válida', 'fecha'); - $form->addRule('fecha', 'El campo desde no es obligatorio', 'required', ''); + $form->addRule('fecha', 'El campo desde no es obligatorio', 'required'); // Cambia el formulario dependiendo de la accion que se quiera tomar. if (@$_REQUEST['accion']) { -- 2.43.0 From 4755255f8b34acfaeec40cadbe2a04f2dc5570fe Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Wed, 2 Jul 2003 23:03:07 +0000 Subject: [PATCH 15/16] Se traducen los warnings de javascript. --- lib/MECON/HTML/QuickForm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MECON/HTML/QuickForm.php b/lib/MECON/HTML/QuickForm.php index 7258df1..1c7763d 100644 --- a/lib/MECON/HTML/QuickForm.php +++ b/lib/MECON/HTML/QuickForm.php @@ -41,6 +41,7 @@ class MECON_HTML_QuickForm extends HTML_QuickForm { $this->registerElementType('mdate', 'MECON/HTML/QuickForm/mdate.php', 'HTML_QuickForm_mdate'); $this->registerRule('fecha', 'function', 'validate', 'HTML_QuickForm_mdate'); $this->setRequiredNote('* indica un campo obligatorio'); + $this->setJsWarnings('Hay errores en el formulario:', 'Por favor corríjalos antes de continuar.'); } function addRule($element, $message, $type, $format='', $validation='client', $reset = false, $force = false) { -- 2.43.0 From 33a81970240b498ed10f3ca688ae3578a013dfef Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Thu, 3 Jul 2003 16:40:38 +0000 Subject: [PATCH 16/16] Cambio en Arbol, ahora usa HTML_Image --- lib/MECON/HTML/Arbol.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/MECON/HTML/Arbol.php b/lib/MECON/HTML/Arbol.php index bca4d58..5dcea2b 100644 --- a/lib/MECON/HTML/Arbol.php +++ b/lib/MECON/HTML/Arbol.php @@ -1,6 +1,7 @@ '2', 'cellpadding' => '0', 'class' => 'bodytext')); - $this->addRow(array('')); + $this->addRow(array(new HTML_Image($imagen,'',array('width'=>'132', + 'height'=>'26', + 'border'=>'0')))); $this->expandir($dat, 0); } + function expandir($dat, $n) { $imagen = ''; - $class = 'menu'; $bullets = array('', '/MECON/images/arbol_bullet_1.gif', '/MECON/images/arbol_bullet_2.gif', '/MECON/images/arbol_bullet_3.gif'); $tabulados = array(0, 7, 13, 20); $classes = array('menu', 'menu1', 'menu1', 'menu2'); - $imagen = ''; + + $atr = array('border' => '0', + 'width' => $tabulados[$n], + 'height' => '10'); + $imagen =& new HTML_Image($bullets[$n], 'bullet', $atr); foreach($dat as $e) { + $e['titulo'] = $imagen->toHTML().$e['titulo']; if(!is_null($e['link'])) - $e['titulo'] = ''.$imagen.$e['titulo'].''; - if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo'; - else $class_a = $classes[$n]; - $this->t_interna->addRow(array($e['titulo']), array('class' => $class_a)); + $e['titulo'] = ''.$e['titulo'].''; + if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo'; + else $class = $classes[$n]; + $this->t_interna->addRow(array($e['titulo']), array('class' => $class)); if(isset($e['sub'])) $this->expandir($e['sub'], $n+1); } } + function toHTML() { echo ''; -- 2.43.0