dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33039
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16815: ER formatting weakness fixed + minor sorting bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16815 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-09-24 13:58:20 +0200
message:
ER formatting weakness fixed + minor sorting bug fixed.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2014-09-24 12:43:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2014-09-24 11:56:28 +0000
@@ -6323,10 +6323,10 @@
var xResponse = service.response.query.getExtendedResponse(layout, response),
table = web.report.query.getHtml(layout, xResponse);
- if (layout.sorting) {
- xResponse = web.report.query.sort(layout, xResponse);
- table = web.report.query.getHtml(layout, xResponse);
- }
+ //if (layout.sorting) {
+ //xResponse = web.report.query.sort(layout, xResponse);
+ //table = web.report.query.getHtml(layout, xResponse);
+ //}
ns.app.centerRegion.removeAll(true);
ns.app.centerRegion.update(table.html);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2014-09-09 12:37:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2014-09-24 11:56:28 +0000
@@ -2825,16 +2825,16 @@
web.report.query.format = function(str) {
var n = parseFloat(str);
-
- if (!Ext.isNumber(n)) {
+
+ // return string if
+ // - parsefloat(string) is not a number
+ // - string is just starting with a number
+ // - string is a valid date
+ if (!Ext.isNumber(n) || n != str || new Date(str).toString() !== 'Invalid Date') {
return str;
}
- if (new Date(str).toString() === 'Invalid Date') {
- return n;
- }
-
- return str;
+ return n;
};
web.report.query.getHtml = function(layout, xResponse) {