dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07755
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2275: (GIS) Minor bugs fixed + DHIS database set as default map source.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2275 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-09-29 14:29:17 +0200
message:
(GIS) Minor bugs fixed + DHIS database set as default map source.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.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/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java 2010-08-30 13:58:52 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapUserSettingsAction.java 2010-09-29 12:21:47 +0000
@@ -29,6 +29,7 @@
import static org.hisp.dhis.mapping.MappingService.KEY_MAP_SOURCE_TYPE;
import static org.hisp.dhis.mapping.MappingService.MAP_SOURCE_TYPE_GEOJSON;
+import static org.hisp.dhis.mapping.MappingService.MAP_SOURCE_TYPE_DATABASE;
import static org.hisp.dhis.mapping.MappingService.KEY_MAP_DATE_TYPE;
import static org.hisp.dhis.mapping.MappingService.MAP_DATE_TYPE_FIXED;
@@ -80,7 +81,7 @@
public String execute()
throws Exception
{
- mapSourceType = (String) userSettingService.getUserSetting( KEY_MAP_SOURCE_TYPE, MAP_SOURCE_TYPE_GEOJSON );
+ mapSourceType = (String) userSettingService.getUserSetting( KEY_MAP_SOURCE_TYPE, MAP_SOURCE_TYPE_DATABASE );
mapDateType = (String) userSettingService.getUserSetting( KEY_MAP_DATE_TYPE, MAP_DATE_TYPE_FIXED );
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-09-28 22:06:26 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-09-29 12:26:39 +0000
@@ -2446,7 +2446,7 @@
value: MAPSOURCE,
store: new Ext.data.SimpleStore({
fields: ['id', 'text'],
- data: [[map_source_type_geojson, 'GeoJSON files'], [map_source_type_shapefile, 'Shapefiles'], [map_source_type_database, 'DHIS database']]
+ data: [[map_source_type_database, 'DHIS database'], [map_source_type_geojson, 'GeoJSON files'], [map_source_type_shapefile, 'Shapefiles']]
}),
listeners: {
'select': {
@@ -3255,7 +3255,7 @@
legendDiv: 'polygonlegend',
defaults: {width: 130},
listeners: {
- 'expand': {
+ expand: {
fn: function() {
if (ACTIVEPANEL != thematicMap) {
ACTIVEPANEL = thematicMap;
@@ -3277,7 +3277,7 @@
legendDiv: 'pointlegend',
defaults: {width: 130},
listeners: {
- 'expand': {
+ expand: {
fn: function() {
if (ACTIVEPANEL != thematicMap2) {
ACTIVEPANEL = thematicMap2;
=== 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-09-28 22:06:26 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2010-09-29 12:21:47 +0000
@@ -68,6 +68,8 @@
mapData: false,
+ stores: false,
+
initComponent: function() {
this.legend = {};
this.legend.type = map_legend_type_automatic;
@@ -226,7 +228,6 @@
Ext.getCmp('period_cb').showField();
Ext.getCmp('startdate_df').hideField();
Ext.getCmp('enddate_df').hideField();
-
Ext.getCmp('periodtype_cb').setValue(this.mapView.periodTypeId);
periodStore.setBaseParam('name', this.mapView.periodTypeId);
periodStore.load();
@@ -364,7 +365,7 @@
fn: function() {
if (this.mapView) {
Ext.getCmp('period_cb').setValue(this.mapView.periodId);
-
+
Ext.Ajax.request({
url: path_mapping + 'setMapUserSettings' + type,
method: 'POST',
@@ -454,8 +455,19 @@
}
});
+ this.stores = {
+ mapViewStore: mapViewStore,
+ indicatorGroupStore: indicatorGroupStore,
+ indicatorStore: indicatorStore,
+ dataElementGroupStore: dataElementGroupStore,
+ dataElementStore: dataElementStore,
+ periodTypeStore: periodTypeStore,
+ periodStore: periodStore,
+ mapStore: mapStore,
+ predefinedMapLegendSetStore: predefinedMapLegendSetStore
+ }
+
this.items = [
-
{
xtype: 'combo',
id: 'mapview_cb',