← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10128: Fix bug - Don't select orgunits on tree when to run a favorite in tabular report.

 

------------------------------------------------------------
revno: 10128
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 13:23:02 +0700
message:
  Fix bug - Don't select orgunits on tree when to run a favorite in tabular report.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/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-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-03-11 06:04:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-03-11 06:23:02 +0000
@@ -1051,10 +1051,12 @@
 								var treepanel = TR.cmp.params.organisationunit.treepanel;
 								treepanel.getSelectionModel().deselectAll();
 								TR.state.orgunitIds = [];
+								var orgunitUids = [];
 								for (var i = 0; i < f.orgunitIds.length; i++) {
 									TR.state.orgunitIds.push( f.orgunitIds[i].localid );
+									orgunitUids.push( f.orgunitIds[i].id );
 								}
-								treepanel.selectByIds(TR.state.orgunitIds);
+								treepanel.selectByIds(orgunitUids);
 								
 								 // Patient properties
 								 Ext.getCmp('filterPropPanel').removeAll();
@@ -1242,11 +1244,12 @@
 								var treepanel = TR.cmp.params.organisationunit.treepanel;
 								treepanel.getSelectionModel().deselectAll();
 								TR.state.orgunitIds = [];
-								treepanel.numberOfRecords = f.orgunitIds.length;
+								var orgunitUids = [];
 								for (var i = 0; i < f.orgunitIds.length; i++) {
 									TR.state.orgunitIds.push( f.orgunitIds[i].localid );
+									orgunitUids.push( f.orgunitIds[i].id );
 								}
-								treepanel.selectByIds(TR.state.orgunitIds);
+								treepanel.selectByIds(orgunitUids);
 								
 								// Selected data elements