diff --git a/public/viewjs/batteryform.js b/public/viewjs/batteryform.js index 6f85cbd3..596e9a06 100644 --- a/public/viewjs/batteryform.js +++ b/public/viewjs/batteryform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#battery-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("battery-form"); diff --git a/public/viewjs/batterytracking.js b/public/viewjs/batterytracking.js index ce5142f8..fc39cf78 100644 --- a/public/viewjs/batterytracking.js +++ b/public/viewjs/batterytracking.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#batterytracking-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("batterytracking-form"); diff --git a/public/viewjs/choreform.js b/public/viewjs/choreform.js index 70bf1f3e..538e6d28 100644 --- a/public/viewjs/choreform.js +++ b/public/viewjs/choreform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#chore-form').serializeJSON(); if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) { diff --git a/public/viewjs/choretracking.js b/public/viewjs/choretracking.js index f9a4b5ad..40d2add9 100644 --- a/public/viewjs/choretracking.js +++ b/public/viewjs/choretracking.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#choretracking-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("choretracking-form"); diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index 9f8a3d32..98e30ee4 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#consume-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("consume-form"); @@ -139,6 +144,11 @@ $('#save-mark-as-open-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#consume-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("consume-form"); diff --git a/public/viewjs/equipmentform.js b/public/viewjs/equipmentform.js index ab68af9b..3cc44439 100644 --- a/public/viewjs/equipmentform.js +++ b/public/viewjs/equipmentform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#equipment-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("equipment-form"); diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index f8acbe0e..96d9d7f1 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#inventory-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("inventory-form"); diff --git a/public/viewjs/locationform.js b/public/viewjs/locationform.js index ee52a703..cfa72635 100644 --- a/public/viewjs/locationform.js +++ b/public/viewjs/locationform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#location-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("location-form"); diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 8b7d9023..64060f21 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -394,6 +394,11 @@ $('#save-add-recipe-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + if (document.getElementById("add-recipe-form").checkValidity() === false) //There is at least one validation error { return false; @@ -431,6 +436,11 @@ $('#save-add-note-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + if (document.getElementById("add-note-form").checkValidity() === false) //There is at least one validation error { return false; @@ -472,6 +482,11 @@ $('#save-add-product-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + if (document.getElementById("add-product-form").checkValidity() === false) //There is at least one validation error { return false; diff --git a/public/viewjs/productbarcodeform.js b/public/viewjs/productbarcodeform.js index ece5e050..5339c0eb 100644 --- a/public/viewjs/productbarcodeform.js +++ b/public/viewjs/productbarcodeform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#barcode-form').serializeJSON(); jsonData.amount = jsonData.display_amount; delete jsonData.display_amount; diff --git a/public/viewjs/productgroupform.js b/public/viewjs/productgroupform.js index 0ca0e725..0461c534 100644 --- a/public/viewjs/productgroupform.js +++ b/public/viewjs/productgroupform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#product-group-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("product-group-form"); diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index c8bf5fba..0e8fa8b1 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -4,6 +4,16 @@ $('#save-purchase-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#purchase-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("purchase-form"); diff --git a/public/viewjs/quantityunitconversionform.js b/public/viewjs/quantityunitconversionform.js index 1efcfbf3..61bec445 100644 --- a/public/viewjs/quantityunitconversionform.js +++ b/public/viewjs/quantityunitconversionform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#quconversion-form').serializeJSON(); jsonData.from_qu_id = $("#from_qu_id").val(); Grocy.FrontendHelpers.BeginUiBusy("quconversion-form"); diff --git a/public/viewjs/recipeform.js b/public/viewjs/recipeform.js index f87145f7..2bd1d569 100644 --- a/public/viewjs/recipeform.js +++ b/public/viewjs/recipeform.js @@ -299,6 +299,11 @@ $('#save-recipe-include-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + if (document.getElementById("recipe-include-form").checkValidity() === false) //There is at least one validation error { return false; diff --git a/public/viewjs/recipeposform.js b/public/viewjs/recipeposform.js index d8cdbbf7..70f66dd0 100644 --- a/public/viewjs/recipeposform.js +++ b/public/viewjs/recipeposform.js @@ -4,6 +4,11 @@ $('#save-recipe-pos-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#recipe-pos-form').serializeJSON(); jsonData.recipe_id = Grocy.EditObjectParentId; delete jsonData.display_amount; diff --git a/public/viewjs/shoppinglistform.js b/public/viewjs/shoppinglistform.js index 62b00759..5bcd4035 100644 --- a/public/viewjs/shoppinglistform.js +++ b/public/viewjs/shoppinglistform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#shopping-list-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("shopping-list-form"); diff --git a/public/viewjs/shoppinglistitemform.js b/public/viewjs/shoppinglistitemform.js index 38bdfe65..fc8dacac 100644 --- a/public/viewjs/shoppinglistitemform.js +++ b/public/viewjs/shoppinglistitemform.js @@ -4,6 +4,11 @@ $('#save-shoppinglist-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#shoppinglist-form').serializeJSON(); if (!jsonData.product_id) { diff --git a/public/viewjs/shoppinglocationform.js b/public/viewjs/shoppinglocationform.js index 0213decc..6b0abf0e 100644 --- a/public/viewjs/shoppinglocationform.js +++ b/public/viewjs/shoppinglocationform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#shoppinglocation-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("shoppinglocation-form"); diff --git a/public/viewjs/stockentryform.js b/public/viewjs/stockentryform.js index 75dc2e04..62710970 100644 --- a/public/viewjs/stockentryform.js +++ b/public/viewjs/stockentryform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#stockentry-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("stockentry-form"); diff --git a/public/viewjs/taskcategoryform.js b/public/viewjs/taskcategoryform.js index e1c85689..5be2bc82 100644 --- a/public/viewjs/taskcategoryform.js +++ b/public/viewjs/taskcategoryform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#task-category-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("task-category-form"); diff --git a/public/viewjs/taskform.js b/public/viewjs/taskform.js index 3bbe90bc..054c9960 100644 --- a/public/viewjs/taskform.js +++ b/public/viewjs/taskform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#task-form').serializeJSON(); jsonData.assigned_to_user_id = jsonData.user_id; delete jsonData.user_id; diff --git a/public/viewjs/transfer.js b/public/viewjs/transfer.js index 66d3166d..5973a2ea 100644 --- a/public/viewjs/transfer.js +++ b/public/viewjs/transfer.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonForm = $('#transfer-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("transfer-form"); diff --git a/public/viewjs/userentityform.js b/public/viewjs/userentityform.js index d8c7bc0c..5a19b4ff 100644 --- a/public/viewjs/userentityform.js +++ b/public/viewjs/userentityform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#userentity-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("userentity-form"); diff --git a/public/viewjs/userfieldform.js b/public/viewjs/userfieldform.js index f22b2241..14d79a02 100644 --- a/public/viewjs/userfieldform.js +++ b/public/viewjs/userfieldform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#userfield-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("userfield-form"); diff --git a/public/viewjs/userform.js b/public/viewjs/userform.js index 43a3ed6b..e55ffd44 100644 --- a/public/viewjs/userform.js +++ b/public/viewjs/userform.js @@ -28,6 +28,11 @@ $('#save-user-button').on('click', function(e) { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = $('#user-form').serializeJSON(); Grocy.FrontendHelpers.BeginUiBusy("user-form"); diff --git a/public/viewjs/userobjectform.js b/public/viewjs/userobjectform.js index 10d590a5..4cb33321 100644 --- a/public/viewjs/userobjectform.js +++ b/public/viewjs/userobjectform.js @@ -2,6 +2,11 @@ { e.preventDefault(); + if ($(".combobox-menu-visible").length) + { + return; + } + var jsonData = {}; jsonData.userentity_id = Grocy.EditObjectParentId;