dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00803
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 235: New map and edit map now works with "name".
------------------------------------------------------------
revno: 235
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-04-23 15:58:27 +0200
message:
New map and edit map now works with "name".
modified:
dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js
=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java 2009-04-23 12:08:22 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java 2009-04-23 13:58:27 +0000
@@ -105,7 +105,7 @@
if ( map != null )
{
- map.setNameColumn( name );
+ map.setName( name );
map.setUniqueColumn( uniqueColumn );
map.setNameColumn( nameColumn );
map.setLongitude( longitude );
=== modified file 'gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js'
--- gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js 2009-04-23 13:08:41 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js 2009-04-23 13:58:27 +0000
@@ -291,7 +291,7 @@
{
Ext.Msg.show({
title:'Register shapefiles',
- msg: '<p style="padding-top:8px">The map <b>' + mlp + '</b> was successfully registered!</b></p>',
+ msg: '<p style="padding-top:8px">The map <b>' + nn + '</b> was successfully registered!</b></p>',
buttons: Ext.Msg.OK,
animEl: 'elId',
minWidth: 400,
@@ -314,31 +314,32 @@
text: 'Save changes',
handler: function()
{
+ var en = Ext.getCmp('editname_tf').getValue();
var em = Ext.getCmp('editmap_cb').getValue();
- var en = Ext.getCmp('editname_tf').getValue();
var uc = Ext.getCmp('edituniquecolumn_tf').getValue();
var nc = Ext.getCmp('editnamecolumn_tf').getValue();
var lon = Ext.getCmp('editlongitude_tf').getValue();
var lat = Ext.getCmp('editlatitude_tf').getValue();
var zoom = Ext.getCmp('editzoom_cb').getValue();
- if (!em || !en || !uc || !nc || !lon || !lat)
+ if (!en || !em || !uc || !nc || !lon || !lat)
{
Ext.MessageBox.alert('Error', 'Form is not complete');
return;
}
+alert(en + '\n' + em + '\n' + uc + '\n' + nc + '\n' + lon + '\n' + lat + '\n' + zoom);
Ext.Ajax.request(
{
url: path + 'addOrUpdateMap' + type,
method: 'GET',
- params: { mapLayerPath: em, name: en, uniqueColumn: uc, nameColumn: nc, longitude: lon, latitude: lat, zoom: zoom },
+ params: { name: en, mapLayerPath: em, uniqueColumn: uc, nameColumn: nc, longitude: lon, latitude: lat, zoom: zoom },
success: function( responseObject )
{
Ext.Msg.show({
title:'Register shapefiles',
- msg: '<p style="padding-top:8px">The map <b>' + em + '</b> was successfully updated!</b></p>',
+ msg: '<p style="padding-top:8px">The map <b>' + en + '</b> was successfully updated!</b></p>',
buttons: Ext.Msg.OK,
animEl: 'elId',
minWidth: 400,
@@ -347,6 +348,7 @@
Ext.getCmp('map_cb').getStore().reload();
Ext.getCmp('maps_cb').getStore().reload();
+ Ext.getCmp('editmap_cb').getStore().reload();
},
failure: function()
{
@@ -361,7 +363,7 @@
text: 'Delete map',
handler: function()
{
- var mlp = Ext.getCmp('deletemap_cb').getValue();
+ var name = Ext.getCmp('deletemap_cb').getValue();
if (!mlp)
{
@@ -379,7 +381,7 @@
{
Ext.Msg.show({
title:'Register shapefiles',
- msg: '<p style="padding-top:8px">The map <b>' + mlp + '</b> was successfully deleted!</b></p>',
+ msg: '<p style="padding-top:8px">The map <b>' + name + '</b> was successfully deleted!</b></p>',
buttons: Ext.Msg.OK,
animEl: 'elId',
minWidth: 400,
@@ -388,6 +390,8 @@
Ext.getCmp('map_cb').getStore().reload();
Ext.getCmp('maps_cb').getStore().reload();
+ Ext.getCmp('deletemap_cb').getStore().reload();
+
},
failure: function()
{
--
Trunk
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.