← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21039: PT noext.

 

------------------------------------------------------------
revno: 21039
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-11-12 16:40:10 +0100
message:
  PT noext.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core2.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-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js	2015-11-12 15:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js	2015-11-12 15:40:10 +0000
@@ -67,17 +67,18 @@
         }));
 
         // root nodes
-        //requestManager.add(new N.Api.Request({
-            //baseUrl: metaDataManager.getPath() + '/api/organisationUnits.json',
-            //params: {
-                //'userDataViewFallback': true,
-                //'paging': false,
-                //'fields': 'id,' + metaDataManager.getDisplayProperty() + ',children[id,' + namePropertyUrl + ']',
-            //fn: function(r) {
-                //metaDataManager.viewUnapprovedData = r;
-                //requestManager.ok(this);
-            //}
-        //}));
+        requestManager.add(new N.Api.Request({
+            baseUrl: metaDataManager.getPath() + '/api/organisationUnits.json',
+            params: [
+                'userDataViewFallback=true',
+                'fields=id,' + metaDataManager.getDisplayProperty() + ',children[id,' + metaDataManager.getDisplayProperty() + ']',
+                'paging=false'
+            ],
+            fn: function(r) {
+                metaDataManager.rootNodes = r.organisationUnits;
+                requestManager.ok(this);
+            }
+        }));
 
 
         requestManager.run();

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core2.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core2.js	2015-11-12 15:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core2.js	2015-11-12 15:40:10 +0000
@@ -499,7 +499,7 @@
         };
 
         MetaDataManager.prototype.getAnalysisFields = function() {
-            return this.analysisFields = this.analysisFields : (this.analysisFields = (this.defaultAnalysisFields.join(',').replaceAll('$', this.getDisplayProperty())));
+            return this.analysisFields ? this.analysisFields : (this.analysisFields = (this.defaultAnalysisFields.join(',').replaceAll('$', this.getDisplayProperty())));
         };
 
         N.MetaDataManager = new MetaDataManager();