← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21837: bugfix for optionsets in dataentry

 

------------------------------------------------------------
revno: 21837
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2016-01-30 18:20:58 +0700
message:
  bugfix for optionsets in dataentry
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	2015-12-10 11:07:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2016-01-30 11:20:58 +0000
@@ -3003,7 +3003,7 @@
                 if( !obj || !obj.optionSet || !obj.optionSet.version || !item.v || obj.optionSet.version !== item.v ) {
                     promise = promise.then( function () {
                         return $.ajax( {
-                            url: '../api/optionSets/' + item.uid + '.json?links=false',
+                            url: '../api/optionSets/' + item.uid + '.json?fields=:all,options[:all]',
                             type: 'GET',
                             cache: false
                         } ).done( function ( data ) {
@@ -3050,9 +3050,9 @@
         var optionSetUid = dhis2.de.optionSets[optionSetKey].uid;
         //dhis2.de.autocompleteOptionSetField( item, optionSetUid );
         
-        DAO.store.get( 'optionSets', optionSetUid ).done( function( obj ) {		
+        DAO.store.get( 'optionSets', optionSetUid ).done( function( obj ) {
 		if ( obj && obj.optionSet && obj.optionSet.options ) {
-                    
+
                     $.each( obj.optionSet.options, function( inx, option ) {
                         option.text = option.name;
                         option.id = option.code;