dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36905
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18876: utility method for checking if additional (children) datasets should be fetched in data-entry for...
------------------------------------------------------------
revno: 18876
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-10 15:41:17 +0700
message:
utility method for checking if additional (children) datasets should be fetched in data-entry form.js (not in use yet)
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-04-10 03:20:41 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2015-04-10 08:41:17 +0000
@@ -229,6 +229,24 @@
} );
} );
+dhis2.de.shouldFetchDataSets = function( ids ) {
+ if( !dhis2.de.multiOrganisationUnitEnabled ) {
+ return false;
+ }
+
+ if( !$.isArray(ids) || ids.length == 0 ) {
+ return false;
+ }
+
+ var c = organisationUnits[ids[0]].c;
+
+ if( $.isArray(c) && c.length > 0 && dhis2.de.organisationUnitAssociationSetMap[c[0]] ) {
+ return false;
+ }
+
+ return true;
+};
+
dhis2.de.getMultiOrgUnitSetting = function()
{
return $.ajax({