← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7495: Fill data into the correct columns if the params of Show hierarchy from level is changed into tab...

 

------------------------------------------------------------
revno: 7495
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-03 07:01:08 +0100
message:
  Fill data into the correct columns if the params of Show hierarchy from level is changed into 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	2012-06-20 08:18:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-07-03 06:01:08 +0000
@@ -975,6 +975,15 @@
 		paramChanged: function() {
 			if( TR.store.datatable && TR.store.datatable.data.length)
 			{
+				var orgUnitCols = TR.init.system.maxLevels + 1 - TR.cmp.settings.level.getValue();
+				var orgUnitColsInTable =  ( TR.datatable.datatable.columns 
+									- TR.cmp.params.patientProperty.selected.store.length
+									+ TR.cmp.params.dataelement.selected.store.length );
+				if( orgUnitCols!=orgUnitColsInTable )
+				{
+					return true;
+				}
+				
 				var colNames = new Array();
 				TR.cmp.params.patientProperty.selected.store.each( function(r) {
 					colNames.push( r.data.id );