X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a1798fe6fb238fd2e4b878cd1736ca2b3101daa7..356738e5c502b6907864ac1f0fed23bbbb5780c0:/app/assets/javascripts/user.js diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 146d876f7..681ec3ace 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -1,5 +1,11 @@ //= require leaflet.locatecontrol/src/L.Control.Locate +(function () { + $(document).on("change", "#user_all", function () { + $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked")); + }); +}()); + $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; @@ -121,7 +127,7 @@ $(document).ready(function () { var user = $(this).data("user"); if (user.lon && user.lat) { L.marker([user.lat, user.lon], { icon: OSM.getUserIcon(user.icon) }).addTo(map) - .bindPopup(user.description); + .bindPopup(user.description, { minWidth: 200 }); } }); } @@ -200,10 +206,6 @@ $(document).ready(function () { enableAuth(); } - $("#user_all").change(function () { - $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked")); - }); - $("#content.user_confirm").each(function () { $(this).hide(); $(this).find("#confirm").submit();