2 <%= t 'site.edit.flash_player_required' %>
5 <%= javascript_include_tag 'swfobject.js' %>
7 <% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) %>
9 <script type="text/javascript" defer="defer">
10 var brokenContentSize = $("content").offsetWidth == 0;
11 var fo = new SWFObject("<%= asset_path("/potlatch/potlatch.swf") %>", "potlatch", "100%", "100%", "6", "#FFFFFF");
12 // 700,600 for fixed size, 100%,100% for resizable
14 var winie=false; if (document.all && window.print) { winie=true; }
16 window.onbeforeunload=function() {
18 return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
22 function markChanged(a) { changesaved=a; }
24 function doSWF(lat,lon,sc) {
26 fo.addVariable('winie',winie);
27 fo.addVariable('scale',sc);
28 fo.addVariable('token','<%= session[:token] %>');
29 if (lat) { fo.addVariable('lat',lat); }
30 if (lon) { fo.addVariable('long',lon); }
31 <% if params['gpx'] %>fo.addVariable('gpx' ,'<%= h(params['gpx'] ) %>');<% end %>
32 <% if params['way'] %>fo.addVariable('way' ,'<%= h(params['way'] ) %>');<% end %>
33 <% if params['node'] %>fo.addVariable('node' ,'<%= h(params['node'] ) %>');<% end %>
34 <% if params['tileurl'] %>fo.addVariable('custombg','<%= h(params['tileurl']) %>');<% end %>
38 doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
40 function setPosition(lat, lon, zoom) {
41 doSWF(lat, lon, zoom || 15);