From: Tom Hughes Date: Mon, 15 Nov 2010 09:34:09 +0000 (+0000) Subject: Warn if we fail to contact JOSM X-Git-Tag: live~6303^2~36 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b26adef905a900bb8d171e4fcb37098e4d7718b2 Warn if we fail to contact JOSM --- diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index bc7ca3394..843d0d2de 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -272,9 +272,15 @@ end function josmEditHandler() { var extent = getMapExtent(); + var loaded = false; + $("linkloader").onload = function () { loaded = true; }; $("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') %>"); + }, 1000); + return false; } diff --git a/config/locales/en.yml b/config/locales/en.yml index 2b2694a11..a717e839d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1227,6 +1227,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" 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}}."