dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25696
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12786: Fixed bug - Error when to search in aggregate tabular report.
------------------------------------------------------------
revno: 12786
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-22 10:05:45 +0700
message:
Fixed bug - Error when to search 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-18 04:12:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-10-22 03:05:45 +0000
@@ -1483,7 +1483,11 @@
getDataTableStore: function() {
this.datatable = Ext.create('Ext.data.ArrayStore', {
fields: TR.value.fields,
- data: TR.value.values
+ data: TR.value.values,
+ sorters: [{
+ property: 'value',
+ direction: 'ASC'
+ }]
});
},
caseBasedFavorite: Ext.create('Ext.data.Store', {
@@ -2102,10 +2106,19 @@
// Get fields
var fields = [];
- for( var index=0; index < TR.value.columns.length; index++ )
+ var index=0;
+ for( index=0; index < TR.value.columns.length - 1; index++ )
{
- fields[index] = TR.value.columns[index].name;
+ fields[index] = {
+ name:TR.value.columns[index].name,
+ type: 'string'
+ };
}
+ fields[index] = {
+ name:TR.value.columns[index].name,
+ type: 'number'
+ };
+
TR.value.fields = fields;
// Set data for grid
@@ -2524,6 +2537,7 @@
TR.state.asc = "";
TR.state.desc = column.dataIndex;
}
+ TR.exe.execute(false, true );
}
else{
if( TR.state.sortOrder=='ASC'){
@@ -2533,7 +2547,6 @@
TR.state.sortOrder = "ASC";
}
}
- TR.exe.execute(false, true );
}
}
}
@@ -2700,7 +2713,8 @@
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,
+ name: TR.value.columns[i].column,
+ type: 'number',
sortable: true,
draggable: false,
hideable: false,