X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e78859aeaf40fd7c3d9f1ef1c0c8d1fd14bf41b0..ab4de87d1eef4546a96738154cf81b7d7f72d988:/app/assets/javascripts/user.js diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 69cc259f0..14da8f300 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); @@ -85,8 +87,8 @@ $(document).ready(function () { $("select#user_auth_provider").on("change", updateAuthUID); - $("input#user_image").on("change", function () { - $("#image_action_new").prop("checked", true); + $("input#user_avatar").on("change", function () { + $("#user_avatar_action_new").prop("checked", true); }); function enableAuth() { @@ -121,7 +123,7 @@ $(document).ready(function () { $("input[name=legale]").change(function () { var url = $(this).data("url"); - $("#contributorTerms").html(""); + $("#contributorTerms").html("
" + I18n.t("browse.start_rjs.loading") + "
"); $("#contributorTerms").load(url); });