Merge authors: Jan Henrik Ă˜verland (janhenrik-overland) ------------------------------------------------------------ revno: 2823 [merge] committer: Jan Henrik Overland <janhenrik.overl...@gmail.com> 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();
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp