← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13370: Data entry, categories in meta-data

 

------------------------------------------------------------
revno: 13370
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-12-21 19:09:58 +0100
message:
  Data entry, categories in meta-data
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	2013-12-21 17:02:42 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-12-21 18:09:58 +0000
@@ -1,5 +1,7 @@
 
-// does current user have any organisation units?
+dhis2.util.namespace( 'dhis2.de' );
+
+// whether current user has any organisation units
 var emptyOrganisationUnits = false;
 
 // Identifiers for which zero values are insignificant, also used in entry.js
@@ -25,6 +27,15 @@
 // set association set identifier
 var organisationUnitAssociationSetMap = [];
 
+// Default category combo uid
+dhis2.de.defaultCategoryCombo = undefined;
+
+// Category combinations for data value attributes
+dhis2.de.categoryCombos = {};
+
+// Categories for data value attributes
+dhis2.de.categories = {};
+
 // Array with keys on form {dataelementid}-{optioncomboid}-min/max with min/max
 // values
 var currentMinMaxValueMap = [];
@@ -232,6 +243,9 @@
             optionSets = metaData.optionSets;
 	        dataSetAssociationSets = metaData.dataSetAssociationSets;
 	        organisationUnitAssociationSetMap = metaData.organisationUnitAssociationSetMap;
+	        dhis2.de.defaultCategoryCombo = metaData.defaultCategoryCombo;
+	        dhis2.de.categoryCombos = metaData.categoryCombos;
+	        dhis2.de.categories = metaData.categories;
 
 	        metaDataIsLoaded = true;
 	        selection.responseReceived(); // Notify that meta data is loaded