← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2382: Reverted r 2381

 

------------------------------------------------------------
revno: 2382
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-12-15 16:34:38 +0100
message:
  Reverted r 2381
modified:
  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


--
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-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-12-15 14:19:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2010-12-15 15:34:38 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
-import org.jfree.util.Log;
 
 import com.opensymphony.xwork2.ActionSupport;
 
@@ -117,13 +116,6 @@
     {
         this.coordinates = coordinates;
     }
-    
-    private String featureType;
-
-    public void setFeatureType( String featureType )
-    {
-        this.featureType = featureType;
-    }
 
     private String url;
 
@@ -181,7 +173,6 @@
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
         coordinates = nullIfEmpty( coordinates );
-        featureType = nullIfEmpty( featureType );
         url = nullIfEmpty( url );
         
         contactPerson = nullIfEmpty( contactPerson );
@@ -214,7 +205,6 @@
         OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, code, date, null, true, comment );
 
         organisationUnit.setCoordinates( coordinates );
-        organisationUnit.setFeatureType( featureType );
         organisationUnit.setUrl( url );
         organisationUnit.setParent( parent );
         organisationUnit.setContactPerson( contactPerson );

=== 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-12-15 14:19:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2010-12-15 15:34:38 +0000
@@ -124,16 +124,9 @@
 
     private String coordinates;
 
-    public void setCoordinates( String coordinates )
-    {
-        this.coordinates = coordinates;
-    }
-    
-    private String featureType;
-
-    public void setFeatureType( String featureType )
-    {
-        this.featureType = featureType;
+    public void setPolygonCoordinates( String polygonCoordinates )
+    {
+        this.coordinates = polygonCoordinates;
     }
 
     private String url;
@@ -181,7 +174,6 @@
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
         coordinates = nullIfEmpty( coordinates );
-        featureType = nullIfEmpty( featureType );
         url = nullIfEmpty( url );
         
         contactPerson = nullIfEmpty( contactPerson );
@@ -212,7 +204,6 @@
         organisationUnit.setClosedDate( cDate );
         organisationUnit.setComment( comment );
         organisationUnit.setCoordinates( coordinates );
-        organisationUnit.setFeatureType( featureType );
         organisationUnit.setUrl( url );
         organisationUnit.setContactPerson( contactPerson );
         organisationUnit.setAddress( address );

=== 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-12-15 14:19:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2010-12-15 15:34:38 +0000
@@ -107,5 +107,4 @@
 organisation_units									= organisation units
 found												= Found
 all													= All
-please_select_from_tree								= Please select from tree (optional)
-feature_type										= Feature type
\ No newline at end of file
+please_select_from_tree								= Please select from tree (optional)
\ No newline at end of file

=== 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-12-15 14:19:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2010-12-15 15:34:38 +0000
@@ -1,17 +1,17 @@
 <script>
 	jQuery(document).ready(	function(){
-		validation( 'addOrganisationUnitForm' );
+		validation( 'addOrganisationUnitForm' );	
 		
 		checkValueIsExist( "name", "validateOrganisationUnit.action");
 		checkValueIsExist( "code", "validateOrganisationUnit.action");
 		
-		datePickerValid( 'openingDate', false );
+		datePickerValid( 'openingDate', false );			
 	});
 </script>
 
 <h3>$i18n.getString( "create_new_org_unit" ) #openHelp( "ou_edit" )</h3>
 
-<form id="addOrganisationUnitForm" name="addOrganisationUnitForm" action="addOrganisationUnit.action" method="post">
+<form id="addOrganisationUnitForm" action="addOrganisationUnit.action" method="post">
 
 <table>
 	<tr>
@@ -40,11 +40,7 @@
 	</tr>
     <tr>
         <td><label for="coordinates">$i18n.getString( "coordinates" )</label></td>
-        <td><textarea id="coordinates" name="coordinates" style="width:20em; height:5em" onkeyup="setFeatureType(this.value)"></textarea></td>
-    </tr>
-    <tr>
-        <td><label for="featureType">$i18n.getString( "feature_type" )</label></td>
-        <td><input type="text" id="featureType" name="featureType" style="width:20em" readonly="readonly"/></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>
@@ -84,25 +80,4 @@
 	nameField.select();
 	nameField.focus();
 	var adding_the_org_unit_failed = '$encoder.jsEscape( $i18n.getString( "adding_the_org_unit_failed" ) , "'" )';
-	
-	function setFeatureType(c) {
-	   document.addOrganisationUnitForm.featureType.value = getFeatureType(c);
-    }
-	
-	function getFeatureType(c) {
-        if (c.length >= 2) {
-            if (c.substring(0,1) == "[" && c.substring(1,2) != "[" && c.substring(c.length-1,c.length) == "]") {
-                return "Point";
-            }
-    
-            if (c.length >= 8) {
-                if (c.substring(0,4) == "[[[[" && c.substring(c.length-4,c.length) == "]]]]") {
-                    return "MultiPolygon";
-                }
-            }
-        }
-
-        return "";
-    }
-    
-</script>
+</script>
\ No newline at end of file

=== 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-12-15 14:19:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2010-12-15 15:34:38 +0000
@@ -21,7 +21,7 @@
 
 <h3>$i18n.getString( "edit_org_unit" ) #openHelp( "ou_edit" )</h3>
 
-<form id="updateOrganisationUnitForm" name="updateOrganisationUnitForm" action="updateOrganisationUnit.action" method="post">
+<form id="updateOrganisationUnitForm" action="updateOrganisationUnit.action" method="post">
 
 <div>
 	<input type="hidden" id="id" name="id" value="$organisationUnit.id"/>
@@ -33,11 +33,11 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" maxlength="160" value="$!encoder.htmlEncode( $organisationUnit.name )" onchange="nameChanged()" style="width:20em" class="{validate:{required:true,minlength:2}}"/></td>
+		<td><input type="text" id="name" name="name" maxlength="160" value="$encoder.htmlEncode( $organisationUnit.name )" onchange="nameChanged()" style="width:20em" class="{validate:{required:true,minlength:2}}"/></td>
 	</tr>
 	<tr>
 		<td><label for="shortName">$i18n.getString( "short_name" )</label></td>
-		<td><input type="text" id="shortName" name="shortName" maxlength="25" value="$!encoder.htmlEncode( $organisationUnit.shortName )" style="width:20em" class="{validate:{required:true,minlength:2}}"/></td>
+		<td><input type="text" id="shortName" name="shortName" maxlength="25" value="$encoder.htmlEncode( $organisationUnit.shortName )" style="width:20em" class="{validate:{required:true,minlength:2}}"/></td>
 	</tr>
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
@@ -69,11 +69,7 @@
 	</tr>
     <tr>
         <td><label for="coordinates">$i18n.getString( "coordinates" )</label></td>
-        <td><textarea id="coordinates" name="coordinates" style="width:20em; height:5em" onkeyup="setFeatureType(this.value)">$!encoder.htmlEncode( $organisationUnit.coordinates )</textarea></td>
-    </tr>
-    <tr>
-        <td><label for="featureType">$i18n.getString( "feature_type" )</label></td>
-        <td><input type="text" id="featureType" name="featureType" value="$!encoder.htmlEncode( $organisationUnit.featureType )" style="width:20em" readonly="readonly"/></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>
@@ -106,24 +102,4 @@
 <script type="text/javascript">
 	var previousName = '$encoder.jsEscape( $organisationUnit.name, "'" )';
 	var saving_the_org_unit_failed = '$encoder.jsEscape( $i18n.getString( "saving_the_org_unit_failed" ) , "'" )';
-    
-    function setFeatureType(c) {
-       document.updateOrganisationUnitForm.featureType.value = getFeatureType(c);
-    }
-    
-    function getFeatureType(c) {
-        if (c.length >= 2) {
-            if (c.substring(0,1) == "[" && c.substring(1,2) != "[" && c.substring(c.length-1,c.length) == "]") {
-                return "Point";
-            }
-    
-            if (c.length >= 8) {
-                if (c.substring(0,4) == "[[[[" && c.substring(c.length-4,c.length) == "]]]]") {
-                    return "MultiPolygon";
-                }
-            }
-        }
-
-        return "";
-    }
 </script>