dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11097
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3108: Minor bug quickly fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 3108 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-03-21 12:51:28 +0100
message:
Minor bug quickly fixed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.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/webapp/dhis-web-mapping/mapping/index.html'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html 2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html 2011-03-21 11:49:58 +0000
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>DHIS 2 - OpenHealthMapper</title>
+ <title>OpenHealthMapper - Joint HISP/WHO initiative</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- CSS -->
=== 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 2011-03-16 13:42:50 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2011-03-21 11:49:58 +0000
@@ -385,6 +385,7 @@
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
numZoomLevels: 21
});
+
gm_normal.layerType = G.conf.map_layer_type_baselayer;
G.vars.map.addLayer(gm_normal);
@@ -394,6 +395,7 @@
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
numZoomLevels: 21
});
+
gm_hybrid.layerType = G.conf.map_layer_type_baselayer;
G.vars.map.addLayer(gm_hybrid);
@@ -549,44 +551,46 @@
handler: function() {
var v = Ext.getCmp('favorite_cb').getValue();
var rw = Ext.getCmp('favorite_cb').getRawValue();
- var userId = G.stores.mapView.getAt(G.stores.mapView.findExact('id', v)).data.userId;
- if (userId || G.user.isAdmin) {
- if (!v) {
- Ext.message.msg(false, G.i18n.please_select_a_map_view);
- return;
- }
-
- Ext.Ajax.request({
- url: G.conf.path_mapping + 'deleteMapView' + G.conf.type,
- method: 'POST',
- params: {id: v},
- success: function(r) {
- Ext.message.msg(true, G.i18n.favorite + ' <span class="x-msg-hl">' + rw + '</span> ' + G.i18n.deleted);
- Ext.getCmp('favorite_cb').clearValue();
-
- var featureType = G.stores.mapView.getAt(G.stores.mapView.findExact('id', v)).data.featureType;
- if (featureType == G.conf.map_feature_type_multipolygon) {
- G.stores.polygonMapView.load();
- }
- else if (featureType == G.conf.map_feature_type_point) {
- G.stores.pointMapView.load();
- }
-
- G.stores.mapView.load();
-
- if (v == choropleth.form.findField('mapview').getValue()) {
- choropleth.form.findField('mapview').clearValue();
- }
- if (v == symbol.form.findField('mapview').getValue()) {
- symbol.form.findField('mapview').clearValue();
- }
- }
- });
+ if (v) {
+ var userId = G.stores.mapView.getAt(G.stores.mapView.findExact('id', v)).data.userId;
+ if (userId || G.user.isAdmin) {
+ Ext.Ajax.request({
+ url: G.conf.path_mapping + 'deleteMapView' + G.conf.type,
+ method: 'POST',
+ params: {id: v},
+ success: function(r) {
+ Ext.message.msg(true, G.i18n.favorite + ' <span class="x-msg-hl">' + rw + '</span> ' + G.i18n.deleted);
+ Ext.getCmp('favorite_cb').clearValue();
+
+ var featureType = G.stores.mapView.getAt(G.stores.mapView.findExact('id', v)).data.featureType;
+ if (featureType == G.conf.map_feature_type_multipolygon) {
+ G.stores.polygonMapView.load();
+ }
+ else if (featureType == G.conf.map_feature_type_point) {
+ G.stores.pointMapView.load();
+ }
+
+ G.stores.mapView.load();
+
+ if (v == choropleth.form.findField('mapview').getValue()) {
+ choropleth.form.findField('mapview').clearValue();
+ }
+ if (v == symbol.form.findField('mapview').getValue()) {
+ symbol.form.findField('mapview').clearValue();
+ }
+ }
+ });
+ }
+ else {
+ Ext.message.msg(false, 'Access denied');
+ }
}
else {
- Ext.message.msg(false, 'Access denied');
+ Ext.message.msg(false, G.i18n.please_select_a_map_view);
+ return;
}
+
}
},
{
@@ -609,8 +613,8 @@
method: 'POST',
params: {id: v},
success: function(r) {
+ Ext.getCmp('favorite_cb').clearValue();
Ext.message.msg(true, G.i18n.favorite + ' <span class="x-msg-hl">' + rv + '</span> ' + G.i18n.added_to_dashboard);
- Ext.getCmp('favorite_cb').clearValue();
}
});
}