← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2823: Improved feedback when no coordinates are found.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2823 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-02-08 01:42:18 +0100
message:
  Improved feedback when no coordinates are found.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-02-01 14:37:15 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-02-08 00:40:24 +0000
@@ -1453,6 +1453,12 @@
                         var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
                         G.vars.exportValues = G.util.getExportDataValueJSON(mapvalues);
                         
+                        if (!this.layer.features.length) {
+                            Ext.message.msg(false, 'No coordinates found');
+                            G.vars.mask.hide();
+                            return;
+                        }
+                        
                         if (mapvalues.length === 0) {
                             Ext.message.msg(false, G.i18n.current_selection_no_data);
                             G.vars.mask.hide();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-02-01 14:37:15 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-02-08 00:40:24 +0000
@@ -1441,6 +1441,12 @@
                         var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
                         G.vars.exportValues = G.util.getExportDataValueJSON(mapvalues);
                         
+                        if (!this.layer.features.length) {
+                            Ext.message.msg(false, 'No coordinates found');
+                            G.vars.mask.hide();
+                            return;
+                        }
+                        
                         if (mapvalues.length === 0) {
                             Ext.message.msg(false, G.i18n.current_selection_no_data);
                             G.vars.mask.hide();