← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7269: Reload TR result by the params on the left panel if adding more properties or dataelements.

 

------------------------------------------------------------
revno: 7269
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-06-11 15:53:25 +0700
message:
  Reload TR result by the params on the left panel if adding more properties or dataelements.
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-11 08:24:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-06-11 08:53:25 +0000
@@ -981,14 +981,21 @@
 				});
 					
 				var cols = TR.datatable.datatable.columns;
+				var colDataLen = 0;
 				for( var i=0; i<cols.length; i++ )
 				{
 					var col = cols[i];
-					if( col.name && col.name.indexOf('meta_')==-1 && colNames.indexOf(col.name) == -1 )
+					if( col.name && col.name.indexOf('meta_')==-1 )
 					{
-						return true;
+						colDataLen ++;
+						if( colNames.indexOf(col.name) == -1 )
+							return true;
 					}
 				}
+				if( colDataLen < colNames.length )
+				{
+					return true;
+				}
 				return false;
 			}
 			return true;