X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/eb7678145a87c1b9e3cd7ff2d3b5dc08132e4b51..492a6405306092c39c26b4f6cc8b2e793ee22d43:/app/assets/javascripts/user.js?ds=sidebyside diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 73bb2406e..69cc259f0 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -9,7 +9,7 @@ $(document).ready(function () { var position = $("html").attr("dir") === "rtl" ? "topleft" : "topright"; - L.OSM.zoom({position: position}) + L.OSM.zoom({ position: position }) .addTo(map); var locate = L.control.locate({ @@ -39,7 +39,7 @@ $(document).ready(function () { } if ($("#map").hasClass("set_location")) { - var marker = L.marker([0, 0], {icon: OSM.getUserIcon()}); + var marker = L.marker([0, 0], { icon: OSM.getUserIcon() }); if (OSM.home) { marker.setLatLng([OSM.home.lat, OSM.home.lon]); @@ -64,7 +64,7 @@ $(document).ready(function () { $("[data-user]").each(function () { var user = $(this).data("user"); if (user.lon && user.lat) { - L.marker([user.lat, user.lon], {icon: OSM.getUserIcon(user.icon)}).addTo(map) + L.marker([user.lat, user.lon], { icon: OSM.getUserIcon(user.icon) }).addTo(map) .bindPopup(user.description); } }); @@ -124,4 +124,12 @@ $(document).ready(function () { $("#contributorTerms").html(""); $("#contributorTerms").load(url); }); + + $("#read_ct").on("click", function () { + $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_tou").prop("checked"))); + }); + + $("#read_tou").on("click", function () { + $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_ct").prop("checked"))); + }); });