Skip to content

Commit

Permalink
Fixed #16387 -- Disabled localization in openlayers template. Thanks,…
Browse files Browse the repository at this point in the history
… claudep.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jezdez committed Aug 12, 2011
1 parent d686667 commit cb1d660
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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); OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.SphericalMercator.projectForward);
{% block vars %}var {{ module }} = {}; {% block vars %}var {{ module }} = {};
{{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {}; {{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
Expand Down Expand Up @@ -68,7 +68,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
{{ module }}.clearFeatures = function (){ {{ module }}.clearFeatures = function (){
{{ module }}.deleteFeatures(); {{ module }}.deleteFeatures();
document.getElementById('{{ id }}').value = ''; document.getElementById('{{ id }}').value = '';
{% localize off %}
{{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }}); {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
{% endlocalize %}
} }
// Add Select control // Add Select control
{{ module }}.addSelectControl = function(){ {{ module }}.addSelectControl = function(){
Expand Down Expand Up @@ -137,7 +139,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
{{ module }}.map.zoomTo({{ point_zoom }}); {{ module }}.map.zoomTo({{ point_zoom }});
} }
} else { } else {
{% localize off %}
{{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }}); {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
{% endlocalize %}
} }
// This allows editing of the geographic fields -- the modified WKT is // 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 // written back to the content field (as EWKT, so that the ORM will know
Expand Down

0 comments on commit cb1d660

Please sign in to comment.