X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c441a4dc15f2de78e6c43a51a850b394a25aa5a9..e2e61692ea04fc156221082aeddc21ea18facdec:/app/assets/javascripts/user.js diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 2af9e18cb..77a71097b 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -6,7 +6,7 @@ }); }()); -$(document).ready(function () { +$(function () { const defaultHomeZoom = 12; let map, marker, deleted_lat, deleted_lon; @@ -26,9 +26,9 @@ $(document).ready(function () { icon: "icon geolocate", iconLoading: "icon geolocate", strings: { - title: I18n.t("javascripts.map.locate.title"), + title: OSM.i18n.t("javascripts.map.locate.title"), popup: function (options) { - return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance }); + return OSM.i18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance }); } } }).addTo(map); @@ -210,10 +210,10 @@ $(document).ready(function () { }); $("input[name=legale]").change(function () { - const url = $(this).data("url"); - - $("#contributorTerms").html("
" + I18n.t("browse.start_rjs.loading") + "
"); - $("#contributorTerms").load(url); + $("#contributorTerms").html("
" + OSM.i18n.t("browse.start_rjs.loading") + "
"); + fetch($(this).data("url")) + .then(r => r.text()) + .then(html => { $("#contributorTerms").html(html); }); }); $("#read_ct").on("click", function () {