dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25599
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12748: Fixed bug sort-order in Aggregate tabular report.
------------------------------------------------------------
revno: 12748
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-10-17 01:24:12 +0700
message:
Fixed bug sort-order in Aggregate 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:07:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-10-16 18:24:12 +0000
@@ -1612,7 +1612,7 @@
total: 0,
asc: "",
desc: "",
- sortOrder: "",
+ sortOrder: "ASC",
orgunitIds: [],
generateReport: function( type ) {
if(Ext.getCmp('reportTypeGroup').getValue().reportType=='true')
@@ -1769,7 +1769,7 @@
params += '&startDate=' + TR.cmp.settings.startDate.rawValue;
params += '&endDate=' + TR.cmp.settings.endDate.rawValue;
- if(TR.cmp.settings.ouMode.getValue()!="" ){
+ if(TR.cmp.settings.ouMode != null && TR.cmp.settings.ouMode.getValue()!="" ){
params += '&ouMode=' + TR.cmp.settings.ouMode.getValue();
}
@@ -1878,9 +1878,7 @@
}
// Sort-order
- if( TR.state.sortOrder!= '' ){
- params += '&sortOrder=' + TR.state.sortOrder;
- }
+ params += '&sortOrder=' + TR.state.sortOrder;
}
return params;
@@ -2528,7 +2526,12 @@
}
}
else{
- TR.state.sortOrder = column.sortState;
+ if( column.sortState=='ASC'){
+ TR.state.sortOrder = "DESC";
+ }
+ else{
+ TR.state.sortOrder = "ASC";
+ }
}
TR.exe.execute(false, true );
}
@@ -2678,7 +2681,7 @@
},
createAggColTable: function(){
var cols = [];
- var i=0;
+ var i = 0;
for( i=0; i <TR.value.columns.length - 1; i++ )
{
cols[i] = {
@@ -2686,7 +2689,7 @@
dataIndex: TR.value.columns[i].name,
height: TR.conf.layout.east_gridcolumn_height,
name: TR.value.columns[i].column,
- sortable: true,
+ sortable: false,
draggable: false,
hideable: false,
menuDisabled: true
@@ -2694,16 +2697,16 @@
}
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,
- draggable: false,
- hideable: false,
- menuDisabled: true
- }
-
+ 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,
+ draggable: false,
+ hideable: false,
+ menuDisabled: true
+ }
+
return cols;
},
createColumn: function( type, id, colname, index ){