← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3067: Reverted r3039. Minor fix.

 

------------------------------------------------------------
revno: 3067
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-18 10:47:06 +0100
message:
  Reverted r3039. Minor fix.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js


--
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-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java	2011-03-18 08:17:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java	2011-03-18 09:47:06 +0000
@@ -44,7 +44,7 @@
  */
 public class I18nFormat
 {
-    private static final DecimalFormat FORMAT_DOUBLE = new DecimalFormat( "#.#;#.#" ); // Fixed for now
+    private static final DecimalFormat FORMAT_VALUE = new DecimalFormat( "#.#;#.#" ); // Fixed for now
     private static final String EMPTY = "";
     
     private ResourceBundle resourceBundle;
@@ -185,7 +185,7 @@
     
     public String formatValue( Object value )
     {
-        return value != null ? FORMAT_DOUBLE.format( value ) : EMPTY;
+        return value != null ? FORMAT_VALUE.format( value ) : EMPTY;
     }
     
     // -------------------------------------------------------------------------

=== 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-03-15 06:39:35 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2011-03-18 09:47:06 +0000
@@ -147,7 +147,7 @@
 {
     var dataElementId = dataElementId_;
     var optionComboId = optionComboId_;
-    var value = new Number( value_ );
+    var value = value_;
     var resultColor = resultColor_;
     var selectedOption = selectedOption_;
     var organisationUnitId = organisationUnitId_;
@@ -207,8 +207,6 @@
         }
 
         element.style.backgroundColor = color;
-		
-		element.value = new Number(element.value);
     }
 }