X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a570f59187efa0a298d31bae2b224de9762bb42f..3aafc697f5c285cb45ad8e9dab75f1ab44d2a012:/app/assets/javascripts/user.js?ds=inline
diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js
index 3839a18c2..964f187f9 100644
--- a/app/assets/javascripts/user.js
+++ b/app/assets/javascripts/user.js
@@ -1,4 +1,4 @@
-//= require leaflet.locate
+//= require leaflet.locatecontrol/src/L.Control.Locate
$(document).ready(function () {
if ($("#map").length) {
@@ -18,9 +18,9 @@ $(document).ready(function () {
iconLoading: "icon geolocate",
strings: {
title: I18n.t("javascripts.map.locate.title"),
- metersUnit: I18n.t("javascripts.map.locate.metersUnit"),
- feetUnit: I18n.t("javascripts.map.locate.feetUnit"),
- popup: I18n.t("javascripts.map.locate.popup")
+ popup: function (options) {
+ return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
+ }
}
}).addTo(map);
@@ -54,7 +54,7 @@ $(document).ready(function () {
precision = OSM.zoomPrecision(zoom),
location = e.latlng.wrap();
- $("#homerow").removeClass();
+ $("#home_message").hide();
$("#home_lat").val(location.lat.toFixed(precision));
$("#home_lon").val(location.lng.toFixed(precision));
@@ -88,7 +88,7 @@ $(document).ready(function () {
$("select#user_auth_provider").on("change", updateAuthUID);
$("input#user_avatar").on("change", function () {
- $("#avatar_action_new").prop("checked", true);
+ $("#user_avatar_action_new").prop("checked", true);
});
function enableAuth() {
@@ -123,7 +123,7 @@ $(document).ready(function () {
$("input[name=legale]").change(function () {
var url = $(this).data("url");
- $("#contributorTerms").html("");
+ $("#contributorTerms").html("