← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12747: Remove PDF download, allow to download CSV file in tabular report.

 

------------------------------------------------------------
revno: 12747
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-10-17 01:07:07 +0700
message:
  Remove PDF download, allow to download CSV file 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-10-16 18:02:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-10-16 18:07:07 +0000
@@ -100,7 +100,6 @@
 		},
 		download: {
             xls: 'xls',
-			pdf: 'pdf',
 			csv: 'csv'
         },
         cmd: {
@@ -1905,7 +1904,7 @@
 				
 				if( type)
 				{
-					document.location =  url + programId + ".xls?stage=" + programStageId + TR.state.getURLParams();
+					document.location =  url + programId + "." + type + "?stage=" + programStageId + TR.state.getURLParams();
 				}
 				// Show report on grid
 				else
@@ -2072,7 +2071,7 @@
 				// Export to XLS
 				if( type)
 				{
-					document.location =  url + programId + ".xls?stage=" + programStageId + TR.state.getURLParams();
+					document.location =  url + programId + "." + type + "?stage=" + programStageId + TR.state.getURLParams();
 				}
 				// Show report on grid
 				else
@@ -2680,7 +2679,7 @@
 		createAggColTable: function(){
 			var cols = [];
 			var i=0;
-			for( i =0; i <TR.value.columns.length; i++ )
+			for( i=0; i <TR.value.columns.length - 1; i++ )
 			{
 				cols[i] = {
 					header: TR.value.columns[i].column, 
@@ -4464,7 +4463,6 @@
 													// for case-based report
 													Ext.getCmp('limitOption').setVisible(false);
 													Ext.getCmp('aggregateType').setVisible(false);
-													Ext.getCmp('downloadPdfIcon').setVisible(false);
 													Ext.getCmp('downloadCvsIcon').setVisible(false);
 													Ext.getCmp('aggregateFavoriteBtn').setVisible(false);
 													Ext.getCmp('deSumCbx').setVisible(false);
@@ -4487,7 +4485,6 @@
 													// For aggregate report
 													Ext.getCmp('limitOption').setVisible(true);
 													Ext.getCmp('aggregateType').setVisible(true);
-													Ext.getCmp('downloadPdfIcon').setVisible(true);
 													Ext.getCmp('downloadCvsIcon').setVisible(true);
 													Ext.getCmp('aggregateFavoriteBtn').setVisible(true);
 													Ext.getCmp('deSumCbx').setVisible(true);
@@ -5705,15 +5702,6 @@
 											}
 										},
 										{
-											text: TR.i18n.pdf,
-											iconCls: 'tr-menu-item-pdf',
-											id: 'downloadPdfIcon',
-											minWidth: 105,
-											handler: function() {
-												b.execute(TR.conf.finals.download.pdf);
-											}
-										},
-										{
 											text: TR.i18n.csv,
 											iconCls: 'tr-menu-item-csv',
 											id: 'downloadCvsIcon',
@@ -5788,7 +5776,6 @@
 				Ext.getCmp('limitOption').setVisible(false);
 				Ext.getCmp('deSumCbx').setVisible(false);
 				Ext.getCmp('aggregateType').setVisible(false);
-				Ext.getCmp('downloadPdfIcon').setVisible(false);
 				Ext.getCmp('downloadCvsIcon').setVisible(false);
 				Ext.getCmp('aggregateFavoriteBtn').setVisible(false);
 				Ext.getCmp('caseBasedFavoriteBtn').setVisible(true);