From: Tom Hughes Date: Tue, 13 Oct 2009 20:27:38 +0000 (+0000) Subject: Merge 17130 from trunk. X-Git-Tag: live~6534^2~3 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/3244635aa11878135a014cf2c9ec9177f8e9d0ba?hp=-c Merge 17130 from trunk. --- 3244635aa11878135a014cf2c9ec9177f8e9d0ba diff --combined app/views/site/edit.html.erb index 51389afc1,79b1f64af..b29c0f200 --- a/app/views/site/edit.html.erb +++ b/app/views/site/edit.html.erb @@@ -12,7 -12,7 +12,7 @@@ <% else %> <% 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('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> | <% end %> <% end %> @@@ -65,7 -65,7 +65,7 @@@ zoom='14' if zoom.nil window.onbeforeunload=function() { if (!changesaved) { - return "<%= t 'site.edit.potlatch_unsaved_changes' %>"; + return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>'; } } @@@ -78,10 -78,9 +78,10 @@@ fo.addVariable('token','<%= session[:token] %>'); if (lat) { fo.addVariable('lat',lat); } if (lon) { fo.addVariable('long',lon); } - <% if params['gpx'] %>fo.addVariable('gpx' ,'<%= h(params['gpx'] ) %>');<% end %> - <% if params['way'] %>fo.addVariable('way' ,'<%= h(params['way'] ) %>');<% end %> - <% if params['node'] %>fo.addVariable('node','<%= h(params['node']) %>');<% end %> + <% if params['gpx'] %>fo.addVariable('gpx' ,'<%= h(params['gpx'] ) %>');<% end %> + <% if params['way'] %>fo.addVariable('way' ,'<%= h(params['way'] ) %>');<% end %> + <% if params['node'] %>fo.addVariable('node' ,'<%= h(params['node'] ) %>');<% end %> + <% if params['tileurl'] %>fo.addVariable('custombg','<%= h(params['tileurl']) %>');<% end %> fo.write("map"); }