Replace JOSM editing option with generic Remote Control option
This commit is contained in:
parent
2a80b2b45a
commit
aa4a8fdc81
4 changed files with 12 additions and 12 deletions
|
@ -34,7 +34,7 @@ class SiteController < ApplicationController
|
||||||
def edit
|
def edit
|
||||||
editor = params[:editor] || @user.preferred_editor || DEFAULT_EDITOR
|
editor = params[:editor] || @user.preferred_editor || DEFAULT_EDITOR
|
||||||
|
|
||||||
if editor == "josm"
|
if editor == "remote"
|
||||||
render :action => :index
|
render :action => :index
|
||||||
else
|
else
|
||||||
# Decide on a lat lon to initialise potlatch with. Various ways of doing this
|
# Decide on a lat lon to initialise potlatch with. Various ways of doing this
|
||||||
|
|
|
@ -270,7 +270,7 @@ end
|
||||||
resizeMap();
|
resizeMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
function josmEditHandler(event) {
|
function remoteEditHandler(event) {
|
||||||
var extent = getMapExtent();
|
var extent = getMapExtent();
|
||||||
var loaded = false;
|
var loaded = false;
|
||||||
|
|
||||||
|
@ -278,20 +278,20 @@ end
|
||||||
$("linkloader").src = "http://127.0.0.1:8111/load_and_zoom?left=" + extent.left + "&top=" + extent.top + "&right=" + extent.right + "&bottom=" + extent.bottom;
|
$("linkloader").src = "http://127.0.0.1:8111/load_and_zoom?left=" + extent.left + "&top=" + extent.top + "&right=" + extent.right + "&bottom=" + extent.bottom;
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (!loaded) alert("<%= t('site.index.josm_failed') %>");
|
if (!loaded) alert("<%= t('site.index.remote_failed') %>");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
event.stop();
|
event.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
function installEditHandler() {
|
function installEditHandler() {
|
||||||
$("josmanchor").observe("click", josmEditHandler);
|
$("remoteanchor").observe("click", remoteEditHandler);
|
||||||
|
|
||||||
<% if preferred_editor == "josm" %>
|
<% if preferred_editor == "remote" %>
|
||||||
$("editanchor").observe("click", josmEditHandler);
|
$("editanchor").observe("click", remoteEditHandler);
|
||||||
|
|
||||||
<% if params[:action] == "edit" %>
|
<% if params[:action] == "edit" %>
|
||||||
josmEditHandler();
|
remoteEditHandler();
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,9 +87,9 @@ en:
|
||||||
potlatch2:
|
potlatch2:
|
||||||
name: "Potlatch 2"
|
name: "Potlatch 2"
|
||||||
description: "Potlatch 2 (in-browser editor)"
|
description: "Potlatch 2 (in-browser editor)"
|
||||||
josm:
|
remote:
|
||||||
name: "JOSM"
|
name: "Remote Control"
|
||||||
description: "JOSM (via remote-control plugin)"
|
description: "Remote Control (JOSM or Merkaartor)"
|
||||||
browse:
|
browse:
|
||||||
changeset:
|
changeset:
|
||||||
title: "Changeset"
|
title: "Changeset"
|
||||||
|
@ -1238,7 +1238,7 @@ en:
|
||||||
license_url: "http://creativecommons.org/licenses/by-sa/2.0/"
|
license_url: "http://creativecommons.org/licenses/by-sa/2.0/"
|
||||||
project_name: "OpenStreetMap project"
|
project_name: "OpenStreetMap project"
|
||||||
project_url: "http://openstreetmap.org"
|
project_url: "http://openstreetmap.org"
|
||||||
josm_failed: "Editing failed - make sure JOSM is loaded and the remote control plugin is enabled"
|
remote_failed: "Editing failed - make sure JOSM or Merkaartor is loaded and the remote control option is enabled"
|
||||||
edit:
|
edit:
|
||||||
not_public: "You have not set your edits to be public."
|
not_public: "You have not set your edits to be public."
|
||||||
not_public_description: "You can no longer edit the map unless you do so. You can set your edits as public from your {{user_page}}."
|
not_public_description: "You can no longer edit the map unless you do so. You can set your edits as public from your {{user_page}}."
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module Editors
|
module Editors
|
||||||
ALL_EDITORS = [ "potlatch", "potlatch2", "josm" ]
|
ALL_EDITORS = [ "potlatch", "potlatch2", "remote" ]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue