X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c202448ade514cd5ecca7175555011c851735e9..50f658142be71156945d5ab3a73ae3851365768b:/app/assets/javascripts/user.js diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 7cbdb1e11..8e4410fce 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,7 +18,9 @@ $(document).ready(function () { iconLoading: "icon geolocate", strings: { title: I18n.t("javascripts.map.locate.title"), - popup: I18n.t("javascripts.map.locate.popup") + popup: function (options) { + return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance }); + } } }).addTo(map); @@ -86,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() {