dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10386
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2854: Reverted R 2840 and 2841
------------------------------------------------------------
revno: 2854
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-02-15 14:44:03 +0100
message:
Reverted R 2840 and 2841
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
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/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java 2011-02-14 07:18:11 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java 2011-02-15 13:44:03 +0000
@@ -96,6 +96,6 @@
*/
public static String nullIfEmpty( String string )
{
- return string != null && string.trim().length() == 0 ? null : string.trim();
+ return string != null && string.trim().length() == 0 ? null : string;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-02-14 04:25:57 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-02-15 13:44:03 +0000
@@ -21,13 +21,6 @@
var organisationUnitId = getFieldValue( 'organisationUnitId' );
field.style.backgroundColor = COLOR_YELLOW;
-
- if ( isZeroNumber( field.value ) && significantZeros.indexOf( dataElementId ) == -1 )
- {
- // If value is 0 and zero is not significant for data element, then skip value
-
- field.value = '';
- }
if ( field.value && field.value != '' )
{
@@ -52,7 +45,14 @@
{
window.alert( i18n_value_must_negative_number + '\n\n' + dataElementName );
return alertField( field );
- }
+ }
+ else if ( isZeroNumber( field.value ) && significantZeros.indexOf( dataElementId ) == -1 )
+ {
+ // If value is 0 and zero is not significant for data element, then skip value
+
+ field.style.backgroundColor = COLOR_GREEN;
+ return;
+ }
else
{
var minString = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].min' ).innerHTML;
=== 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 2011-02-14 07:18:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java 2011-02-15 13:44:03 +0000
@@ -177,7 +177,6 @@
public String execute()
throws Exception
{
- name = nullIfEmpty( name );
code = nullIfEmpty( code );
comment = nullIfEmpty( comment );
coordinates = nullIfEmpty( coordinates );
=== 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 2011-02-14 07:18:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java 2011-02-15 13:44:03 +0000
@@ -178,7 +178,6 @@
public String execute()
throws Exception
{
- name = nullIfEmpty( name );
code = nullIfEmpty( code );
comment = nullIfEmpty( comment );
coordinates = nullIfEmpty( coordinates );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java 2011-02-14 07:18:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java 2011-02-15 13:44:03 +0000
@@ -100,7 +100,7 @@
if ( name != null )
{
- OrganisationUnit match = organisationUnitService.getOrganisationUnitByName( name.trim() );
+ OrganisationUnit match = organisationUnitService.getOrganisationUnitByName( name );
if ( match != null && (id == null || match.getId() != id) )
{
@@ -108,7 +108,7 @@
return ERROR;
}
- }
+ }
message = "OK";