dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23482
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11436: (PT) Boundary/level restore bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11436 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-07-18 11:44:47 +0200
message:
(PT) Boundary/level restore bug fixed.
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-07-17 14:32:58 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-07-18 09:43:36 +0000
@@ -4309,7 +4309,7 @@
dimNames = [],
isOu = false,
isOuc = false,
- isLevel = false;
+ level;
// State
pt.viewport.interpretationButton.enable();
@@ -4470,25 +4470,17 @@
isOuc = true;
}
if (ouRecords[i].id.substr(0,5) === 'LEVEL') {
- isLevel = true;
+ level = parseInt(ouRecords[i].id.split('-')[1]);
}
}
}
- if (isLevel) {
- var ouRecords = recMap[dimConf.organisationUnit.objectName],
- level;
-
- if (Ext.isArray(ouRecords) && ouRecords.length) {
- level = ouRecords[i].id.split('-')[1];
- }
-
+ if (level) {
toolMenu.clickHandler('boundary');
organisationUnitLevel.setValue(level);
}
else {
- toolMenu.clickHandler('explicit');
-
+ toolMenu.clickHandler('explicit');
userOrganisationUnit.setValue(isOu);
userOrganisationUnitChildren.setValue(isOuc);
}