← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1901: Removed use of isNumeric for coordinates. Removed latitude and longitude from user interface

 

------------------------------------------------------------
revno: 1901
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-05-26 11:57:16 +0200
message:
  Removed use of isNumeric for coordinates. Removed latitude and longitude from user interface
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportParams.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsWithPolygonsAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportParams.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportParams.java	2010-05-25 12:13:33 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ImportParams.java	2010-05-26 09:57:16 +0000
@@ -29,8 +29,6 @@
 
 import java.util.Date;
 
-import org.hisp.dhis.system.util.MathUtils;
-
 /**
  * @author Lars Helge Overland
  * @version $Id: ImportParams.java 6425 2008-11-22 00:08:57Z larshelg $
@@ -78,12 +76,7 @@
         {
             return false;
         }
-        
-        if ( !MathUtils.isNumeric( minorVersion ) )
-        {
-            throw new IllegalArgumentException( "Invalid version, must be numeric: " + minorVersion );            
-        }
-        
+                
         double _minorVersion = Double.parseDouble( minorVersion ) * 1000;
         double _requiredVersion = Double.parseDouble( requiredVersion ) * 1000;
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2010-05-26 09:57:16 +0000
@@ -110,27 +110,13 @@
         this.comment = comment;
     }
     
-    private String polygonCoordinates;
-
-    public void setPolygonCoordinates( String polygonCoordinates )
-    {
-        this.polygonCoordinates = polygonCoordinates;
-    }
-
-    private String latitude;
-
-    public void setLatitude( String latitude )
-    {
-        this.latitude = latitude;
-    }
-    
-    private String longitude;
-
-    public void setLongitude( String longitude )
-    {
-        this.longitude = longitude;
-    }
-    
+    private String coordinates;
+    
+    public void setCoordinates( String coordinates )
+    {
+        this.coordinates = coordinates;
+    }
+
     private String url;
 
     public void setUrl( String url )
@@ -158,9 +144,7 @@
     {
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
-        polygonCoordinates = nullIfEmpty( polygonCoordinates );
-        latitude = nullIfEmpty( latitude );
-        longitude = nullIfEmpty( longitude );
+        coordinates = nullIfEmpty( coordinates );
         url = nullIfEmpty( url );
 
         Date date = format.parseDate( openingDate );
@@ -188,9 +172,7 @@
         OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, 
             code, date, null, true, comment );
         
-        organisationUnit.setPolygonCoordinates( polygonCoordinates );
-        organisationUnit.setLatitude( latitude );
-        organisationUnit.setLongitude( longitude );
+        organisationUnit.setCoordinates( coordinates );
         organisationUnit.setUrl( url );
         organisationUnit.setParent( parent );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2010-05-26 09:57:16 +0000
@@ -122,25 +122,11 @@
         this.comment = comment;
     }
 
-    private String polygonCoordinates;
+    private String coordinates;
 
     public void setPolygonCoordinates( String polygonCoordinates )
     {
-        this.polygonCoordinates = polygonCoordinates;
-    }
-
-    private String latitude;
-
-    public void setLatitude( String latitude )
-    {
-        this.latitude = latitude;
-    }
-    
-    private String longitude;
-
-    public void setLongitude( String longitude )
-    {
-        this.longitude = longitude;
+        this.coordinates = polygonCoordinates;
     }
 
     private String url;
@@ -159,9 +145,7 @@
     {
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
-        polygonCoordinates = nullIfEmpty( polygonCoordinates );
-        latitude = nullIfEmpty( latitude );
-        longitude = nullIfEmpty( longitude );
+        coordinates = nullIfEmpty( coordinates );
         url = nullIfEmpty( url );
 
         Date oDate = format.parseDate( openingDate );
@@ -186,9 +170,7 @@
         organisationUnit.setOpeningDate( oDate );
         organisationUnit.setClosedDate( cDate );
         organisationUnit.setComment( comment );
-        organisationUnit.setPolygonCoordinates( polygonCoordinates );
-        organisationUnit.setLatitude( latitude );
-        organisationUnit.setLongitude( longitude );
+        organisationUnit.setCoordinates( coordinates );
         organisationUnit.setUrl( url );
 
         organisationUnitService.updateOrganisationUnit( organisationUnit );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2010-04-07 15:43:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2010-05-26 09:57:16 +0000
@@ -105,10 +105,8 @@
 object_not_deleted_associated_by_objects			= Object not deleted becuause it is associated by objects of type
 hide_warning										= Hide warning
 url													= URL
-latitude											= Latitude
-longitude											= Longitude
 type												= Type
-polygon_coordinates									= Polygon coordinates
+coordinates											= Coordinates
 assign_to_compulsory_group_set						= Assign to compulsory organisation unit group set
 organisation_unit_group_set							= Organisation unit group set
 available_organisation_units						= Available organisation units

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2010-04-23 15:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2010-05-26 09:57:16 +0000
@@ -58,16 +58,8 @@
 		<td><textarea id="comment" name="comment" style="width:20em; height:5em"></textarea></td>
 	</tr>
     <tr>
-        <td><label for="polygonCoordinates">$i18n.getString( "polygon_coordinates" )</label></td>
-        <td><textarea id="polygonCoordinates" name="polygonCoordinates" style="width:20em; height:5em"></textarea></td>
-    </tr>
-    <tr>
-        <td><label for="latitude">$i18n.getString( "latitude" )</label></td>
-        <td><input type="text" id="latitude" name="latitude" style="width:20em" maxlength="255" class="{validate:{maxlength:255}}"></td>
-    </tr>
-    <tr>
-        <td><label for="longitude">$i18n.getString( "longitude" )</label></td>
-        <td><input type="text" id="longitude" name="longitude" style="width:20em" maxlength="255" class="{validate:{maxlength:255}}"></td>
+        <td><label for="coordinates">$i18n.getString( "coordinates" )</label></td>
+        <td><textarea id="coordinates" name="coordinates" style="width:20em; height:5em"></textarea></td>
     </tr>
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2010-04-23 15:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2010-05-26 09:57:16 +0000
@@ -76,16 +76,8 @@
 		<td><textarea id="comment" name="comment" style="width:20em; height:5em">$!encoder.htmlEncode( $organisationUnit.comment )</textarea></td>
 	</tr>
     <tr>
-        <td><label for="polygonCoordinates">$i18n.getString( "polygon_coordinates" )</label></td>
-        <td><textarea id="polygonCoordinates" name="polygonCoordinates" style="width:20em; height:5em">$!encoder.htmlEncode( $organisationUnit.polygonCoordinates )</textarea></td>
-    </tr>
-    <tr>
-        <td><label for="latitude">$i18n.getString( "latitude" )</label></td>
-        <td><input type="text" id="latitude" name="latitude" value="$!encoder.htmlEncode( $organisationUnit.latitude )" maxlength="255" style="width:20em" class="{validate:{maxlength:255}}"></td>
-    </tr>
-    <tr>
-        <td><label for="longitude">$i18n.getString( "longitude" )</label></td>
-        <td><input type="text" id="longitude" name="longitude" value="$!encoder.htmlEncode( $organisationUnit.longitude )"  maxlength="255" style="width:20em" class="{validate:{maxlength:255}}"></td>
+        <td><label for="coordinates">$i18n.getString( "coordinates" )</label></td>
+        <td><textarea id="coordinates" name="coordinates" style="width:20em; height:5em">$!encoder.htmlEncode( $organisationUnit.coordinates )</textarea></td>
     </tr>
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsWithPolygonsAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsWithPolygonsAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsWithPolygonsAction.java	2010-05-26 09:57:16 +0000
@@ -108,7 +108,7 @@
             {
                 public boolean evaluate( Object object )
                 {
-                    return ((OrganisationUnit) object).hasPolygonCoordinates();
+                    return ((OrganisationUnit) object).hasCoordinates();
                 }
             } );