From 8a2f636dcff34a750cb38fad013aae813364408d Mon Sep 17 00:00:00 2001 From: Nathaniel Bond Date: Mon, 30 Dec 2024 09:48:30 -0500 Subject: [PATCH] Attempt initial save guard --- .../src/main/web/js/gemp-022/deckBuildingUi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/deckBuildingUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/deckBuildingUi.js index e9be288bd..be1cf7ca0 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/deckBuildingUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/deckBuildingUi.js @@ -148,6 +148,10 @@ var GempLotrDeckBuildingUI = Class.extend({ newDeckBut.click( function () { + if (that.deckContentsDirty && confirm("Do you wish to save this deck?")) + { + that.saveDeck(false); + } that.deckName = null; $("#editingDeck").text("New deck"); that.clearDeck();