dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21771
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10404: Minor fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 10404 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-22 12:34:03 +0100
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-22 10:09:49 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-22 11:32:54 +0000
@@ -3754,19 +3754,9 @@
}
}
- // Organisation units
- if (Ext.isArray(r.organisationUnits) && Ext.isObject(r.parentGraphMap)) {
- treePanel.numberOfRecords = pt.util.object.getLength(r.parentGraphMap);
- for (var key in r.parentGraphMap) {
- if (r.parentGraphMap.hasOwnProperty(key)) {
- treePanel.multipleExpand(key, r.parentGraphMap[key], true);
- }
- }
- }
- else {
- treePanel.reset();
- }
+ // Organisation units: tree sync/async
+ // User orgunit
userOrganisationUnit.setValue(r.userOrganisationUnit);
userOrganisationUnitChildren.setValue(r.userOrganisationUnitChildren);
@@ -3826,7 +3816,7 @@
if (Ext.isArray(r.rowDimensions)) {
for (var i = 0, dim; i < r.rowDimensions.length; i++) {
dim = pt.conf.finals.dimension.objectNameMap[r.rowDimensions[i]];
-
+
pt.viewport.rowStore.add({
id: dim.dimensionName,
name: dim.name
@@ -3874,8 +3864,17 @@
}
}
- // If fav has organisation units, execute from tree callback instead
- if (!(Ext.isArray(r.organisationUnits) && Ext.isObject(r.parentGraphMap))) {
+ // Organisation units: If fav has organisation units, execute from tree callback instead
+ if (Ext.isArray(r.organisationUnits) && Ext.isObject(r.parentGraphMap)) {
+ treePanel.numberOfRecords = pt.util.object.getLength(r.parentGraphMap);
+ for (var key in r.parentGraphMap) {
+ if (r.parentGraphMap.hasOwnProperty(key)) {
+ treePanel.multipleExpand(key, r.parentGraphMap[key], true);
+ }
+ }
+ }
+ else {
+ treePanel.reset();
update();
}
};