X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/17f4e58e46b42e2b21704ff3293388ea9c11c77d..7b37f4cb62fca5fec3d3d41eacf4601595519c4a:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index d378a6ff7..8d0864f01 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -280,7 +280,15 @@ end map.setCenter(centre, zoom); }); - <% if params[:action] == 'export' %> - <%= remote_function :url => { :controller => 'export', :action => 'start' } %> - <% end %> + document.observe("dom:loaded", function () { + $("exportanchor").observe("click", function (e) { + <%= remote_function :url => { :controller => 'export', :action => 'start' } %>; + Event.stop(e); + }); + + <% if params[:action] == 'export' %> + <%= remote_function :url => { :controller => 'export', :action => 'start' } %>; + <% end %> + }); +// -->