]> git.openstreetmap.org Git - rails.git/commitdiff
Add undelete home location button listener
authorAnton Khorev <tony29@yandex.ru>
Wed, 9 Aug 2023 18:01:12 +0000 (21:01 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 11 Aug 2023 18:44:16 +0000 (21:44 +0300)
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");