dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13618
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4413: Fixed minor bug with min-max in offline mode
------------------------------------------------------------
revno: 4413
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-08-22 10:02:59 +0200
message:
Fixed minor bug with min-max in offline mode
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-20 14:07:56 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-22 08:02:59 +0000
@@ -548,7 +548,8 @@
function insertDataValues()
{
- var dataValueMap = new Array();
+ var dataValueMap = [];
+ currentMinMaxValueMap = []; // Reset
var periodId = $( '#selectedPeriodId' ).val();
var dataSetId = $( '#selectedDataSetId' ).val();
@@ -604,9 +605,8 @@
var dataValue = dataValueMap[value.id];
- if ( dataValue
- && ( ( value.min && new Number( dataValue ) < new Number( value.min ) ) || ( value.max && new Number(
- dataValue ) > new Number( value.max ) ) ) )
+ if ( dataValue && ( ( value.min && new Number( dataValue ) < new Number(
+ value.min ) ) || ( value.max && new Number( dataValue ) > new Number( value.max ) ) ) )
{
$( valFieldId ).css( 'background-color', COLOR_ORANGE );
}