dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33438
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17061: Data entry, improved performance indicator calculation
------------------------------------------------------------
revno: 17061
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-10-11 21:29:38 +0200
message:
Data entry, improved performance indicator calculation
modified:
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/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/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2014-10-10 20:13:34 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2014-10-11 19:29:38 +0000
@@ -77,13 +77,12 @@
dhis2.de.getDataElementTotalValue = function( de )
{
var sum = new Number();
-
- $( 'input[name="entryfield"]' ).each( function( index )
- {
- var key = $( this ).attr( 'id' );
- var entryFieldId = key.substring( 0, key.indexOf( '-' ) );
-
- if ( de && de == entryFieldId && $( this ).attr( 'value' ) )
+
+ $( '[id^="' + de + '"]' ).each( function( index )
+ {
+ var val = $( this ).attr( 'value' );
+
+ if ( val && dhis2.validation.isNumber( val ) )
{
sum += new Number( $( this ).attr( 'value' ) );
}
=== 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 2014-10-07 03:59:22 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-10-11 19:29:38 +0000
@@ -597,7 +597,8 @@
loadDataValues();
dhis2.de.insertOptionSets();
} );
- } else {
+ }
+ else {
dhis2.de.storageManager.formExistsRemotely( dataSetId ).done( function( value ) {
console.log( 'Loading form remotely: ' + dataSetId );