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
|
||||
editor = params[:editor] || @user.preferred_editor || DEFAULT_EDITOR
|
||||
|
||||
if editor == "josm"
|
||||
if editor == "remote"
|
||||
render :action => :index
|
||||
else
|
||||
# Decide on a lat lon to initialise potlatch with. Various ways of doing this
|
||||
|
|
|
@ -270,7 +270,7 @@ end
|
|||
resizeMap();
|
||||
}
|
||||
|
||||
function josmEditHandler(event) {
|
||||
function remoteEditHandler(event) {
|
||||
var extent = getMapExtent();
|
||||
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;
|
||||
|
||||
setTimeout(function () {
|
||||
if (!loaded) alert("<%= t('site.index.josm_failed') %>");
|
||||
if (!loaded) alert("<%= t('site.index.remote_failed') %>");
|
||||
}, 1000);
|
||||
|
||||
event.stop();
|
||||
}
|
||||
|
||||
function installEditHandler() {
|
||||
$("josmanchor").observe("click", josmEditHandler);
|
||||
$("remoteanchor").observe("click", remoteEditHandler);
|
||||
|
||||
<% if preferred_editor == "josm" %>
|
||||
$("editanchor").observe("click", josmEditHandler);
|
||||
<% if preferred_editor == "remote" %>
|
||||
$("editanchor").observe("click", remoteEditHandler);
|
||||
|
||||
<% if params[:action] == "edit" %>
|
||||
josmEditHandler();
|
||||
remoteEditHandler();
|
||||
<% end %>
|
||||
<% end %>
|
||||
}
|
||||
|
|
|
@ -87,9 +87,9 @@ en:
|
|||
potlatch2:
|
||||
name: "Potlatch 2"
|
||||
description: "Potlatch 2 (in-browser editor)"
|
||||
josm:
|
||||
name: "JOSM"
|
||||
description: "JOSM (via remote-control plugin)"
|
||||
remote:
|
||||
name: "Remote Control"
|
||||
description: "Remote Control (JOSM or Merkaartor)"
|
||||
browse:
|
||||
changeset:
|
||||
title: "Changeset"
|
||||
|
@ -1238,7 +1238,7 @@ en:
|
|||
license_url: "http://creativecommons.org/licenses/by-sa/2.0/"
|
||||
project_name: "OpenStreetMap project"
|
||||
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:
|
||||
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}}."
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Editors
|
||||
ALL_EDITORS = [ "potlatch", "potlatch2", "josm" ]
|
||||
ALL_EDITORS = [ "potlatch", "potlatch2", "remote" ]
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue