Skip to content

Commit

Permalink
Add Potlatch 2 as an editor option
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 29, 2010
1 parent cd66a5d commit b90219f
Show file tree
Hide file tree
Showing 287 changed files with 6,421 additions and 3 deletions.
36 changes: 36 additions & 0 deletions app/views/site/_potlatch2.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div id="map">
<%= t 'site.edit.flash_player_required' %>
</div>

<%= javascript_include_tag 'swfobject.js' %>
<script type="text/javascript" defer="defer">
var brokenContentSize = $("content").offsetWidth == 0;
var fo = new SWFObject("/potlatch2/potlatch2.swf?d="+Math.round(Math.random()*1000), "potlatch", "100%", "100%", "9", "#FFFFFF");
// 700,600 for fixed size, 100%,100% for resizable
var changesaved=true;

window.onbeforeunload=function() {
if (!changesaved) {
return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
}
}

function markChanged(a) { changesaved=a; }

function doSWF(lat,lon,zoom) {
fo.addParam("base","/potlatch2");
if (lat) { fo.addVariable("lat",lat); }
if (lon) { fo.addVariable("lon",lon); }
fo.addVariable("zoom",zoom);
fo.addVariable("api","/api/<%= API_VERSION %>/");
fo.addVariable("policy","/api/crossdomain.xml");
fo.addVariable("connection","XML");
fo.write("map");
}

doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);

function setPosition(lat, lon, zoom) {
doSWF(lat, lon, zoom || 15);
}
</script>
5 changes: 3 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,9 @@ en:
flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address."
flash update success: "User information updated successfully."
editor:
potlatch: "Potlatch (in-browser editor)"
josm: "JOSM (via remote-control plugin)"
potlatch: "Potlatch 1 (in-browser editor)"
potlatch2: "Potlatch 2 (in-browser editor)"
josm: "JOSM (via remote-control plugin)"
confirm:
heading: Confirm a user account
press confirm button: "Press the confirm button below to activate your account."
Expand Down
2 changes: 1 addition & 1 deletion lib/editors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Editors
ALL_EDITORS = [ "potlatch", "josm" ]
ALL_EDITORS = [ "potlatch", "potlatch2", "josm" ]
end
Binary file added public/potlatch2/FontLibrary.swf
Binary file not shown.
Binary file added public/potlatch2/features/barrier_generic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions public/potlatch2/features/barrier_generic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/cycle__lcn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/cycle__ncn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/cycle__rcn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/highway__motorway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/highway__service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/highway__trunk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/highway__unclassified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/oneway__-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/oneway__no.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/oneway__yes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/paths__bike.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 217 additions & 0 deletions public/potlatch2/features/paths__bike.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/potlatch2/features/paths__bridleway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b90219f

Please sign in to comment.