← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 21040
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-11-12 16:59:35 +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:40:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app2.js	2015-11-12 15:59:35 +0000
@@ -80,6 +80,24 @@
             }
         }));
 
+        // organisation unit levels
+        requestManager.add(new N.Api.Request({
+            baseUrl: metaDataManager.getPath() + '/api/organisationUnitLevels.json',
+            params: [
+                'fields=id,' + metaDataManager.getDisplayProperty() + 'level',
+                'paging=false'
+            ],
+            fn: function(r) {
+                metaDataManager.organisationUnitLevels = r.organisationUnitLevels;
+
+                if (!r.organisationUnitLevels.length) {
+                    alert('No organisation unit levels found');
+                }
+
+                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:40:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core2.js	2015-11-12 15:59:35 +0000
@@ -484,7 +484,8 @@
                 return this.displayProperty;
             }
 
-            var key = this.userAccount.settings.keyAnalysisDisplayProperty;
+            //var key = this.userAccount.settings.keyAnalysisDisplayProperty || this.defaultDisplayProperty; //todo
+            var key = this.defaultDisplayProperty;
             return this.displayProperty = (key === 'name') ? key : (key + '|rename(name)');
         };