2 <div id="potlatch"><%= t 'site.edit.flash_player_required' %></div>
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;
12 var winie=false; if (document.all && window.print) { winie=true; }
14 window.onbeforeunload=function() {
16 return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
20 function markChanged(a) { changesaved=a; }
22 function doSWF(lat,lon,sc) {
26 flashvars.winie = winie;
28 flashvars.token = '<%= session[:token] %>';
29 if (lat) { flashvars.lat = lat; }
30 if (lon) { flashvars.long = lon; }
31 <% if params['gpx'] %>flashvars.gpx = '<%= h(params['gpx'] ) %>';<% end %>
32 <% if params['way'] %>flashvars.way = '<%= h(params['way'] ) %>';<% end %>
33 <% if params['node'] %>flashvars.node = '<%= h(params['node'] ) %>';<% end %>
34 <% if params['tileurl'] %>flashvars.custombg = '<%= h(params['tileurl']) %>';<% end %>
39 attributes.id = "potlatch";
40 attributes.bgcolor = "#FFFFFF";
42 swfobject.embedSWF("<%= asset_path("/potlatch/potlatch.swf") %>", "potlatch", "100%", "100%", "6","<%= asset_path("expressInstall.swf") %>", flashvars, params, attributes);
43 // 700,600 for fixed size, 100%,100% for resizable
46 doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
48 function setPosition(lat, lon, zoom) {
49 doSWF(lat, lon, zoom || 15);