]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Remove unnecessary wrapper divs
[rails.git] / app / assets / javascripts / user.js
index 13941d6f3e0c3e192b4d0028c16d6adbca828934..8e4410fcee0568d04e2297a178205c60df144454 100644 (file)
@@ -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() {
@@ -125,11 +127,11 @@ $(document).ready(function () {
     $("#contributorTerms").load(url);
   });
 
-  $("#read_ct").on("click", function () { 
+  $("#read_ct").on("click", function () {
     $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_tou").prop("checked")));
   });
 
-  $("#read_tou").on("click", function () { 
+  $("#read_tou").on("click", function () {
     $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_ct").prop("checked")));
   });
 });