]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Add undelete home location button listener
[rails.git] / app / assets / javascripts / user.js
index 24506b4b4e945b467fb006f3d5215e54d88bae17..68b399867b94e1b343eaeef6d1aa0e9f9bc93a58 100644 (file)
@@ -87,6 +87,14 @@ $(document).ready(function () {
         deleted_lon = lon;
         respondToHomeUpdate();
       });
+
+      $("#home_undelete").click(function () {
+        $("#home_lat").val(deleted_lat);
+        $("#home_lon").val(deleted_lon);
+        deleted_lat = null;
+        deleted_lon = null;
+        respondToHomeUpdate();
+      });
     } else {
       $("[data-user]").each(function () {
         var user = $(this).data("user");