← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12218: Add paging for case-based tabular report.

 

------------------------------------------------------------
revno: 12218
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-24 11:30:35 +0700
message:
  Add paging for case-based 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-09-10 15:46:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-09-24 04:30:35 +0000
@@ -1828,7 +1828,7 @@
 		
 		caseBasedReport: {
 			generate: function( type ) {
-				
+			
 				// Validation
 				
 				if( !TR.state.caseBasedReport.validation.objects() )
@@ -1882,6 +1882,8 @@
 							else{
 								TR.value.columns = json.headers;
 								TR.value.values = json.rows;
+								TR.state.totalRecords = json.metaData.pager.total;
+								TR.state.total = json.metaData.pager.pageCount;
 								
 								// Get fields
 								
@@ -1897,6 +1899,7 @@
 								TR.store.getDataTableStore();
 								TR.datatable.getDataTable();
 							}
+							TR.datatable.setPagingToolbarStatus();
 							TR.util.mask.hideMask();
 						}
 					});