Author: jezdez
Date: 2011-08-12 07:14:33 -0700 (Fri, 12 Aug 2011)
New Revision: 16600
Modified:
django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js
Log:
Fixed #16387 -- Disabled localization in openlayers template. Thanks, claudep.
Modified: django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js
===================================================================
--- django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js
2011-08-12 14:14:24 UTC (rev 16599)
+++ django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js
2011-08-12 14:14:33 UTC (rev 16600)
@@ -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 @@
{{ 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 @@
{{ 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
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.