From 5721c4bd62ae7e19e73b0f83008213af07fa44bc Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 10 Jan 2025 20:58:30 +0100 Subject: [PATCH] More modal iframe dialog handling improvements --- public/viewjs/mealplan.js | 1 + public/viewjs/recipeform.js | 22 ++-------------------- views/productbarcodeform.blade.php | 4 ++-- views/productform.blade.php | 21 +-------------------- views/quantityunitconversionform.blade.php | 4 ++-- views/recipeposform.blade.php | 4 ++-- 6 files changed, 10 insertions(+), 46 deletions(-) diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 017f8f0a..1181bc8d 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -119,6 +119,7 @@ $(".calendar").each(function() element.removeClass("fc-event"); element.addClass("text-center"); element.attr("data-meal-plan-entry", event.mealPlanEntry); + element.addClass("discrete-link"); var mealPlanEntry = JSON.parse(event.mealPlanEntry); diff --git a/public/viewjs/recipeform.js b/public/viewjs/recipeform.js index a74abbd9..99335522 100644 --- a/public/viewjs/recipeform.js +++ b/public/viewjs/recipeform.js @@ -223,16 +223,7 @@ $(document).on('click', '.recipe-pos-edit-button', function(e) size: 'large', backdrop: true, closeButton: false, - buttons: { - cancel: { - label: __t('Cancel'), - className: 'btn-secondary responsive-button', - callback: function() - { - $(".modal").last().modal("hide"); - } - } - } + className: "form" }); }); @@ -269,16 +260,7 @@ $("#recipe-pos-add-button").on("click", function(e) size: 'large', backdrop: true, closeButton: false, - buttons: { - cancel: { - label: __t('Cancel'), - className: 'btn-secondary responsive-button', - callback: function() - { - $(".modal").last().modal("hide"); - } - } - } + className: "form" }); }); diff --git a/views/productbarcodeform.blade.php b/views/productbarcodeform.blade.php index 92c568d0..199da09c 100644 --- a/views/productbarcodeform.blade.php +++ b/views/productbarcodeform.blade.php @@ -15,8 +15,8 @@
diff --git a/views/productform.blade.php b/views/productform.blade.php index 1a31b593..b9beb35a 100644 --- a/views/productform.blade.php +++ b/views/productform.blade.php @@ -158,26 +158,7 @@ for="move_on_open">{{ $__t('Move on open') }} 
diff --git a/views/quantityunitconversionform.blade.php b/views/quantityunitconversionform.blade.php index 2016c3fa..9c9471cf 100644 --- a/views/quantityunitconversionform.blade.php +++ b/views/quantityunitconversionform.blade.php @@ -10,8 +10,8 @@