});
}());
-$(document).ready(function () {
+$(function () {
const defaultHomeZoom = 12;
let map, marker, deleted_lat, deleted_lon;
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);
});
$("input[name=legale]").change(function () {
- const url = $(this).data("url");
-
- $("#contributorTerms").html("<div class='spinner-border' role='status'><span class='visually-hidden'>" + I18n.t("browse.start_rjs.loading") + "</span></div>");
- $("#contributorTerms").load(url);
+ $("#contributorTerms").html("<div class='spinner-border' role='status'><span class='visually-hidden'>" + OSM.i18n.t("browse.start_rjs.loading") + "</span></div>");
+ fetch($(this).data("url"))
+ .then(r => r.text())
+ .then(html => { $("#contributorTerms").html(html); });
});
$("#read_ct").on("click", function () {