From 0e98e2a33733915f55bb5483afce5d7da1a43b7c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 9 Aug 2023 21:01:12 +0300 Subject: [PATCH] Add undelete home location button listener --- app/assets/javascripts/user.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 24506b4b4..68b399867 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -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"); -- 2.39.5