dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01106
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 323: Database and shapefile orgunits counter added.
------------------------------------------------------------
revno: 323
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-05-25 13:12:07 +0200
message:
Database and shapefile orgunits counter added.
modified:
gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js
=== 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-05-22 17:15:35 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js 2009-05-25 11:12:07 +0000
@@ -1617,19 +1617,25 @@
var uniqueColumn = mapData.uniqueColumn;
var nameColumn = mapData.nameColumn;
var mlp = mapData.mapLayerPath;
- var count = 0;
+ var count_features = 0;
+ var count_orgunits = 0;
+ var count_match = 0;
for ( var j=0; j < features.length; j++ )
{
+ count_features++;
+
for ( var i=0; i < organisationUnits.length; i++ )
{
+ count_orgunits++;
+
if (features[j].attributes[uniqueColumn] == organisationUnits[i].name)
{
var organisationUnitId = organisationUnits[i].id;
var organisationUnit = organisationUnits[i].name;
var featureId = features[j].attributes[uniqueColumn];
var featureName = features[j].attributes[nameColumn];
- count++;
+ count_match++;
Ext.Ajax.request(
{
@@ -1639,7 +1645,7 @@
success: function( responseObject )
{
-
+
},
failure: function()
{
@@ -1651,7 +1657,7 @@
}
var south_panel = Ext.getCmp('south-panel');
- south_panel.body.dom.innerHTML = count + '<font color="#444444"> organisation units assigned!</font>';
+ south_panel.body.dom.innerHTML = count_match + '<font color="#444444"> organisation units assigned (</font>' + count_orgunits/count_features + '<font color="#444444"> in database, </font>' + count_features + '<font color="#444444"> in shapefile).</font>';
Ext.getCmp('grid_gp').getStore().reload();
loadMapData('assignment');
--
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.