← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12569: Remove sort-by-orgunit in tabular report ( Not yet supported in web-api)

 

------------------------------------------------------------
revno: 12569
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-10-11 13:11:27 +0700
message:
  Remove sort-by-orgunit in tabular report ( Not yet supported in web-api)
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
  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-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2013-10-11 04:31:33 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2013-10-11 06:11:27 +0000
@@ -841,7 +841,7 @@
         {
             sql += statementBuilder.limitRecord( min, max );
         }
-
+        
         return sql;
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-10-11 06:11:27 +0000
@@ -267,6 +267,7 @@
         executeSql( "DROP TABLE patientaggregatereport_startdates" );
         executeSql( "ALTER TABLE patientaggregatereport RENAME level TO ouMode" );  
         executeSql( "ALTER TABLE patientaggregatereport DROP COLUMN facilityLB" );
+        executeSql( "update programstage_dataelements set allowDateInFuture=false where allowDateInFuture is null" );
     }
 
     // -------------------------------------------------------------------------

=== 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-10 02:55:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-10-11 06:11:27 +0000
@@ -999,6 +999,8 @@
 					}
                 },
 				run: function(id) {
+					TR.state.asc = "";
+					TR.state.desc = "";
 					if(Ext.getCmp('reportTypeGroup').getValue().reportType=='true')
 					{
 						this.caseBasedReport.run( id );
@@ -1865,7 +1867,7 @@
 								var fields = [];
 								for( var index=0; index < TR.value.columns.length; index++ )
 								{
-									fields[index] = TR.value.columns[index].column;
+									fields[index] = TR.value.columns[index].name;
 								}
 								TR.value.fields = fields;
 								
@@ -2385,7 +2387,7 @@
 
 			// title
 			var title = TR.cmp.settings.program.rawValue + " - " + TR.cmp.params.programStage.rawValue + " " + TR.i18n.report;
-			if(reportType===false){
+			if(reportType=='false'){
 				title = TR.value.title;
 			}
 			
@@ -2398,7 +2400,7 @@
 					listeners: {
 						headerclick: function(container, column, e) {
 							if( column.sortable ){
-								if( reportType === true ){
+								if( reportType == 'true' ){
 									if(column.sortState=='ASC'){
 										TR.state.asc = column.dataIndex;
 										TR.state.desc = "";
@@ -2521,10 +2523,23 @@
 			for( var i =0; i <TR.value.columns.length; i++ )
 			{
 				// Sortable columns
-				if( i==2 || i== 3 || i>= 6 ){
-					cols[i] = {
-						header: TR.value.columns[i].column, 
-						dataIndex: TR.value.columns[i].column,
+				if( TR.value.columns[i].name=='ouname')
+				{
+					cols[i] = {
+						header: TR.value.columns[i].column, 
+						dataIndex: TR.value.columns[i].name,
+						height: TR.conf.layout.east_gridcolumn_height,
+						name: TR.value.columns[i].column,
+						sortable: false,
+						draggable: false,
+						hideable: false,
+						menuDisabled: true
+					}
+				}
+				else if( i==2 || i== 3 || i>= 6 ){
+					cols[i] = {
+						header: TR.value.columns[i].column, 
+						dataIndex: TR.value.columns[i].name,
 						height: TR.conf.layout.east_gridcolumn_height,
 						name: TR.value.columns[i].column,
 						sortable: true,
@@ -2559,7 +2574,7 @@
 			{
 				cols[i] = {
 					header: TR.value.columns[i].column, 
-					dataIndex: TR.value.columns[i].column,
+					dataIndex: TR.value.columns[i].name,
 					height: TR.conf.layout.east_gridcolumn_height,
 					name: TR.value.columns[i].column,
 					sortable: true,