------------------------------------------------------------
revno: 10591
committer: Morten Olav Hansen <[email protected]>
branch nick: dhis2
timestamp: Wed 2013-04-17 10:59:01 +0700
message:
load datavalues from server if we are online
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-04-16 13:25:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-04-17 03:59:01 +0000
@@ -721,6 +721,16 @@
$( '#commentTB' ).append( comment )
});
}
+
+ _.each( data.dataValues, function ( value, key ) {
+ var fieldId = getProgramStageUid() + '-' + key + '-val';
+ var field = $('#' + fieldId);
+
+ if ( field ) {
+ field.val( value.value );
+ }
+ } );
+
} ).fail(function() {
$('#commentInput').attr('disabled', true)
});
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp