X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5449cf4adcc1fad4b9f43426e6d3e4a8f65e6fbb..ea93ad2f077de1be04a9087c7d20547395fdef9e:/app/views/site/index.rhtml
diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml
index 66f69960b..3bccb7e04 100644
--- a/app/views/site/index.rhtml
+++ b/app/views/site/index.rhtml
@@ -1,6 +1,6 @@
<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
-<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
+<%= link_to_function t('site.index.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>
@@ -10,14 +10,14 @@
@@ -27,7 +27,7 @@
http://openstreetmap.org/ |
- Licensed under the Creative Commons Attribution-Share Alike 2.0 license by the OpenStreetMap project and its contributors. |
+ <%= t 'site.index.license' %> |
@@ -97,6 +97,8 @@ end
var marker;
var map;
+ OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
+
function mapInit(){
map = createMap("map");
@@ -111,7 +113,8 @@ end
setMapExtent(bbox);
<% if box %>
- box = addBoxToMap(bbox);
+ // IE requires Vector layers be initialised on page load, and not under deferred script conditions
+ Event.observe(window, 'load', function() {addBoxToMap(bbox)});
<% end %>
<% else %>
var centre = new OpenLayers.LonLat(<%= lon %>, <%= lat %>);
@@ -169,10 +172,12 @@ end
var zoom = map.getZoom();
var layers = getMapLayers();
var extents = getMapExtent();
+ var expiry = new Date();
- updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents);
+ updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top);
- document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers;
+ expiry.setYear(expiry.getFullYear() + 10);
+ document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers + "; expires=" + expiry.toGMTString();
}
function resizeContent() {