=== 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 2010-12-14 12:53:07 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2010-12-14 13:24:31 +0000 @@ -710,6 +710,10 @@ return; } + if (Ext.getCmp('locatefeature_w')) { + Ext.getCmp('locatefeature_w').destroy(); + } + this.form.findField('mapview').clearValue(); this.updateValues = true; this.organisationUnitSelection.setValues(node.attributes.id, node.attributes.text, node.attributes.level, @@ -1445,10 +1449,6 @@ } if (this.updateValues) { - if (Ext.getCmp('locatefeature_w')) { - Ext.getCmp('locatefeature_w').destroy(); - } - var dataUrl = this.valueType.isIndicator() ? 'getIndicatorMapValues' : 'getDataElementMapValues'; var params = { id: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : this.form.findField('dataelement').getValue(), === 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 2010-12-14 12:53:07 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2010-12-14 13:24:31 +0000 @@ -649,11 +649,15 @@ if (!node) { return; } + + if (Ext.getCmp('locatefeature_w')) { + Ext.getCmp('locatefeature_w').destroy(); + } this.form.findField('mapview').clearValue(); this.updateValues = true; this.organisationUnitSelection.setValues(node.attributes.id, node.attributes.text, node.attributes.level, null, null); - + this.form.findField('boundary').setValue(node.attributes.text); Ext.getCmp('tree_w2').hide(); @@ -1419,11 +1423,7 @@ this.mapView = false; } - if (this.updateValues) { - if (Ext.getCmp('locatefeature_w')) { - Ext.getCmp('locatefeature_w').destroy(); - } - + if (this.updateValues) { var dataUrl = this.valueType.isIndicator() ? 'getIndicatorMapValues' : 'getDataElementMapValues'; var params = { id: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : this.form.findField('dataelement').getValue(),