← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3039: Fix bug: Data-entry-forms-accept-values-with-leading-zeroes.

 

------------------------------------------------------------
revno: 3039
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-03-15 13:39:35 +0700
message:
  Fix bug: Data-entry-forms-accept-values-with-leading-zeroes.
modified:
  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-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-15 13:44:03 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2011-03-15 06:39:35 +0000
@@ -147,7 +147,7 @@
 {
     var dataElementId = dataElementId_;
     var optionComboId = optionComboId_;
-    var value = value_;
+    var value = new Number( value_ );
     var resultColor = resultColor_;
     var selectedOption = selectedOption_;
     var organisationUnitId = organisationUnitId_;
@@ -207,6 +207,8 @@
         }
 
         element.style.backgroundColor = color;
+		
+		element.value = new Number(element.value);
     }
 }