dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00633
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 171: Organisation unit mapping bug fixed.
------------------------------------------------------------
revno: 171
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-04-14 15:38:36 +0200
message:
Organisation unit mapping bug fixed.
modified:
gis/dhis-gis-geostat/demos/geostat/geostat.js
gis/dhis-gis-geostat/mfbase/mapfish/widgets/geostat/Mapping.js
=== modified file 'gis/dhis-gis-geostat/demos/geostat/geostat.js'
--- gis/dhis-gis-geostat/demos/geostat/geostat.js 2009-04-14 13:21:16 +0000
+++ gis/dhis-gis-geostat/demos/geostat/geostat.js 2009-04-14 13:38:36 +0000
@@ -58,7 +58,7 @@
})
});
- map.addLayers([vmap0, jpl_wms, choroplethLayer, propSymbolLayer]);
+ map.addLayers([jpl_wms, vmap0, choroplethLayer, propSymbolLayer]);
// create select feature control for choropleth layer
@@ -558,6 +558,12 @@
function onClickSelectChoropleth(feature)
{
+ if (!Ext.getCmp('grid_gp').getSelectionModel().getSelected())
+ {
+ alert('First, select an organisation unit from the list');
+ return;
+ }
+
var selected = Ext.getCmp('grid_gp').getSelectionModel().getSelected();
var organisationUnitId = selected.data['organisationUnitId'];
var organisationUnit = selected.data['organisationUnit'];
@@ -566,39 +572,26 @@
var mlp = mapData.map.mapLayerPath;
var featureId = feature.attributes[uniqueColumn];
- if (!selected)
- {
- alert('First, select an organisation unit from the list');
- }
- else
- {
- Ext.Ajax.request(
- {
- url: localhost + port + '/dhis-webservice/addOrUpdateMapOrganisationUnitRelation.service',
- method: 'GET',
- params: { mapLayerPath: mlp, organisationUnitId: organisationUnitId, featureId: featureId },
+ Ext.Ajax.request(
+ {
+ url: localhost + '/dhis-webservice/addOrUpdateMapOrganisationUnitRelation.service',
+ method: 'GET',
+ params: { mapLayerPath: mlp, organisationUnitId: organisationUnitId, featureId: featureId },
- success: function( responseObject )
- {
- var south_panel = Ext.getCmp('south-panel');
- south_panel.body.dom.innerHTML = organisationUnit + '<font color="#444444"> assigned to </font>' + featureId + "!";
-
- setMapData('assignment');
- },
- failure: function()
- {
- alert( 'Status', 'Error while retrieving data' );
- }
- });
- }
+ success: function( responseObject )
+ {
+ var south_panel = Ext.getCmp('south-panel');
+ south_panel.body.dom.innerHTML = organisationUnit + '<font color="#444444"> assigned to </font>' + featureId + "!";
+
+ setMapData('assignment');
+ },
+ failure: function()
+ {
+ alert( 'Status', 'Error while retrieving data' );
+ }
+ });
popup_feature.hide();
-
- /*
- var cll = feature.geometry.getBounds().getCenterLonLat();
- map.setCenter(new OpenLayers.LonLat(cll.lon, cll.lat), 9);
- choropleth.setUrl(shapefiles[choropleth.selectedLevel+1], true);
- */
}
function onClickUnselectChoropleth(feature) {}
=== modified file 'gis/dhis-gis-geostat/mfbase/mapfish/widgets/geostat/Mapping.js'
--- gis/dhis-gis-geostat/mfbase/mapfish/widgets/geostat/Mapping.js 2009-04-14 13:21:16 +0000
+++ gis/dhis-gis-geostat/mfbase/mapfish/widgets/geostat/Mapping.js 2009-04-14 13:38:36 +0000
@@ -161,7 +161,8 @@
});
gridView = new Ext.grid.GridView({
- forceFit: true,
+ forceFit: true,
+ sortClasses: ['sort-asc'],
getRowClass: function (row, index){
var cls = '';
var data = row.data;
--
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.