dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29251
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14746: ER, dates/periods issues fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 14746 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-08 17:08:33 +0200
message:
ER, dates/periods issues fixed.
modified:
dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/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-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-04-08 13:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-04-08 15:07:02 +0000
@@ -2842,6 +2842,9 @@
startDate.setValue(layout.startDate);
endDate.setValue(layout.endDate);
}
+ else {
+ onPeriodModeSelect('periods');
+ }
for (var i = 0, periodRecord, checkbox; i < periodRecords.length; i++) {
periodRecord = periodRecords[i];
@@ -3335,7 +3338,7 @@
]
},
reset: function() {
- this.setValue('periods');
+ onPeriodModeSelect('periods');
},
listeners: {
select: function(cmp) {
@@ -3345,6 +3348,8 @@
});
onPeriodModeSelect = function(mode) {
+ periodMode.setValue(mode);
+
if (mode === 'dates') {
startEndDate.show();
periods.hide();
@@ -5191,6 +5196,14 @@
config.showSubTotals = config.subtotals;
delete config.subtotals;
+ if (config.startDate) {
+ config.startDate = config.startDate.substr(0,10);
+ }
+
+ if (config.endDate) {
+ config.endDate = config.endDate.substr(0,10);
+ }
+
web.report.getData(config, true);
}
});