dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28972
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14560: ER, sorting fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 14560 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-31 10:47:10 +0200
message:
ER, sorting fix.
modified:
dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.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-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js 2014-03-29 09:20:38 +0000
+++ dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/core.js 2014-03-31 08:46:05 +0000
@@ -1600,6 +1600,12 @@
header.index = i;
nameHeaderMap[header.name] = header;
+
+ if (header.type === 'java.lang.Double') {
+ for (var j = 0, value; j < xResponse.rows.length; j++) {
+ xResponse.rows[j][i] = parseFloat(xResponse.rows[j][i]);
+ }
+ }
}
for (var i = 0, name; i < dimensionNames.length; i++) {
@@ -1777,7 +1783,7 @@
value: Ext.isNumber(value) ? value : (Number.MAX_VALUE * -1)
});
}
-
+console.log("objects", objects);
support.prototype.array.sort(objects, direction, 'value');
// new id order
@@ -2521,6 +2527,7 @@
index = xResponse.nameHeaderMap[id].index,
rows = xResponse.rows;
+console.log("objects", rows);
support.prototype.array.sort(rows, direction, index);
return xResponse;