summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-08-12 14:14:33 +0000
committerJannis Leidel <jannis@leidel.info>2011-08-12 14:14:33 +0000
commitcb1d660962ac89eda7956b70566ae2324b11ae9e (patch)
tree443f05840fa77989f5ef3a47297644c9e547752e
parentd68666700fa3ca24701479bd0831c3dcfb9f5ab1 (diff)
Fixed #16387 -- Disabled localization in openlayers template. Thanks, claudep.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/gis/templates/gis/admin/openlayers.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/contrib/gis/templates/gis/admin/openlayers.js b/django/contrib/gis/templates/gis/admin/openlayers.js
index c455bffd58..4f34b6be68 100644
--- a/django/contrib/gis/templates/gis/admin/openlayers.js
+++ b/django/contrib/gis/templates/gis/admin/openlayers.js
@@ -1,4 +1,4 @@
-{# Author: Justin Bronn, Travis Pinney & Dane Springmeyer #}
+{% load l10n %}{# Author: Justin Bronn, Travis Pinney & Dane Springmeyer #}
OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.SphericalMercator.projectForward);
{% block vars %}var {{ module }} = {};
{{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
@@ -68,7 +68,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
{{ module }}.clearFeatures = function (){
{{ module }}.deleteFeatures();
document.getElementById('{{ id }}').value = '';
+ {% localize off %}
{{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
+ {% endlocalize %}
}
// Add Select control
{{ module }}.addSelectControl = function(){
@@ -137,7 +139,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
{{ module }}.map.zoomTo({{ point_zoom }});
}
} else {
+ {% localize off %}
{{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
+ {% endlocalize %}
}
// This allows editing of the geographic fields -- the modified WKT is
// written back to the content field (as EWKT, so that the ORM will know