X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/afb4fedbd7b608dfbd2038f853daef26751fc248..4408416b62a67bab980f9fdec3e4be04a7680039:/app/views/site/index.html.erb?ds=sidebyside diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index d378a6ff7..71cafacbc 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -1,7 +1,7 @@ -<% content_for :greeting do %> <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> - <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 15)", { :title => t('layouts.home_tooltip') } %> | -<% end %> + <% content_for :greeting do %> + <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 15)", { :title => t('layouts.home_tooltip') } %> | + <% end %> <% end %> <%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %> @@ -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 %> + }); +// -->