← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19321: GIS restore fav bug fixed + Data type formatting bug fixed.

 

------------------------------------------------------------
revno: 19321
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-06-09 16:00:51 +0200
message:
  GIS restore fav bug fixed + Data type formatting bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/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-mapping/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2015-05-20 07:18:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2015-06-09 14:00:51 +0000
@@ -8511,7 +8511,7 @@
 				objectNameCmpMap[dxDim.dimension].setValue(dxDim.items[0].id);
 
 				// Period
-				period.store.add(gis.conf.period.relativePeriodsMap[peDim.items[0].id] ? gis.conf.period.relativePeriodsMap[peDim.items[0].id] : peDim.items[0]);
+				period.store.add(gis.conf.period.relativePeriodRecordsMap[peDim.items[0].id] ? gis.conf.period.relativePeriodRecordsMap[peDim.items[0].id] : peDim.items[0]);
 				period.setValue(peDim.items[0].id);
 
 				// Legend

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js	2015-05-13 17:26:07 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js	2015-06-09 14:00:51 +0000
@@ -659,7 +659,7 @@
                                                                 for (var i = 0; i < r.rows.length; i++) {
                                                                     records.push({
                                                                         name: r.metaData.names[r.rows[i][dxIndex]],
-                                                                        value: parseFloat(r.rows[i][valueIndex])
+                                                                        value: Ext.isNumeric ? parseFloat(r.rows[i][valueIndex]) : r.rows[i][valueIndex]
                                                                     });
                                                                 }
 
@@ -2792,6 +2792,7 @@
 					{id: 'LAST_YEAR', name: GIS.i18n.last_year}
 				],
 				relativePeriodsMap: {},
+                relativePeriodRecordsMap: {},
 				integratedRelativePeriodsMap: {
 					'THIS_WEEK': 'THIS_WEEK',
 					'LAST_WEEK': 'LAST_WEEK',
@@ -2818,11 +2819,15 @@
 				}
 			};
 
-                // relativePeriodsMap
+                // relativePeriodsMap / records
             for (var i = 0, obj; i < conf.period.relativePeriods.length; i++) {
                 obj = conf.period.relativePeriods[i];
 
                 conf.period.relativePeriodsMap[obj.id] = obj.name;
+                conf.period.relativePeriodRecordsMap[obj.id] = {
+                    id: obj.id,
+                    name: obj.name
+                };
             }
 
             conf.url = {};