[Alba-desarrollo] SVN Alba r4505 - in prosistem/alba/trunk/alba/apps/principal/modules: locacion/templates organizacion/templates

commits en pressenter.com.ar commits en pressenter.com.ar
Lun Mar 19 20:53:11 CET 2007


Author: josx
Date: 2007-03-19 16:53:09 -0300 (Mon, 19 Mar 2007)
New Revision: 4505

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_fk_provincia_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_pais_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/cambiarPaisSuccess.php
   prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_fk_provincia_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_pais_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/cambiarPaisSuccess.php
Log:
Agregue ajax de pais/provincia para locacion y organizacion

Added: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_fk_provincia_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_fk_provincia_id.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_fk_provincia_id.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,2 @@
+<div id="item_provincia">
+</div>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_fk_provincia_id.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_pais_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_pais_id.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_pais_id.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,28 @@
+<?php
+    use_helper('Javascript');
+    
+    $c = new Criteria();
+    $paises = PaisPeer::doSelect($c);
+    if ($locacion->getFkProvinciaId()) {
+        $pais_selected = $locacion->getProvincia()->getPais()->getId();
+        $provincia_id = $locacion->getFkProvinciaId();
+    } else {
+        $pais_selected = $paises[0]->getId();
+        $provincia_id = 0;
+    }
+        
+    echo select_tag('pais_id',objects_for_select($paises,'getId','getNombreLargo',$pais_selected));
+    
+    echo observe_field('pais_id', array(
+        'update'   => 'item_provincia',
+        'url'      => 'locacion/cambiarPais?vista=noMuestraMenu',
+        'with'     => "'pais_id=' + value"));
+        
+        echo javascript_tag(
+            remote_function( array(
+            'update'  => 'item_provincia',
+            'url'     => 'locacion/cambiarPais?vista=noMuestraMenu&pais_id='. $pais_selected . '&provincia_id=' . $provincia_id,
+            ))
+         ); 
+    
+?>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/_pais_id.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/cambiarPaisSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/cambiarPaisSuccess.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/cambiarPaisSuccess.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,8 @@
+<?php
+    use_helper("Object");
+?>
+<div id="item_provincia">
+<?php 
+    echo select_tag('locacion[fk_provincia_id]', objects_for_select($provincias, 'getId','getNombreLargo',$provincia_id), array('control_name' => 'locacion[fk_provincia_id]'));
+?>
+</div>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/locacion/templates/cambiarPaisSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_fk_provincia_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_fk_provincia_id.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_fk_provincia_id.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,2 @@
+<div id="item_provincia">
+</div>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_fk_provincia_id.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_pais_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_pais_id.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_pais_id.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,28 @@
+<?php
+    use_helper('Javascript');
+    
+    $c = new Criteria();
+    $paises = PaisPeer::doSelect($c);
+    if ($organizacion->getFkProvinciaId()) {
+        $pais_selected = $organizacion->getProvincia()->getPais()->getId();
+        $provincia_id = $organizacion->getFkProvinciaId();
+    } else {
+        $pais_selected = $paises[0]->getId();
+        $provincia_id = 0;
+    }
+        
+    echo select_tag('pais_id',objects_for_select($paises,'getId','getNombreLargo',$pais_selected));
+    
+    echo observe_field('pais_id', array(
+        'update'   => 'item_provincia',
+        'url'      => 'organizacion/cambiarPais?vista=noMuestraMenu',
+        'with'     => "'pais_id=' + value"));
+        
+        echo javascript_tag(
+            remote_function( array(
+            'update'  => 'item_provincia',
+            'url'     => 'organizacion/cambiarPais?vista=noMuestraMenu&pais_id='. $pais_selected . '&provincia_id=' . $provincia_id,
+            ))
+         ); 
+    
+?>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/_pais_id.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/cambiarPaisSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/cambiarPaisSuccess.php	2007-03-19 19:52:23 UTC (rev 4504)
+++ prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/cambiarPaisSuccess.php	2007-03-19 19:53:09 UTC (rev 4505)
@@ -0,0 +1,8 @@
+<?php
+    use_helper("Object");
+?>
+<div id="item_provincia">
+<?php 
+    echo select_tag('organizacion[fk_provincia_id]', objects_for_select($provincias, 'getId','getNombreLargo',$provincia_id), array('control_name' => 'organizacion[fk_provincia_id]'));
+?>
+</div>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/organizacion/templates/cambiarPaisSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"




Más información sobre la lista de distribución Alba-desarrollo