Fixed recipe edit button on recipes page gallery view (fixes #2541)

This commit is contained in:
Bernd Bestel 2024-08-24 20:01:01 +02:00
parent 1323fff3e2
commit 2bc58e083d
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 8 additions and 2 deletions

View File

@ -27,6 +27,7 @@
- When self producing a product ("Produces product" recipe option) the name of the recipe is now added to the note field of the created stock entry - When self producing a product ("Produces product" recipe option) the name of the recipe is now added to the note field of the created stock entry
- Fixed that when `FEATURE_FLAG_STOCK_STOCK` was set to `false`, the "Put missing products on shopping list"-button was not visible - Fixed that when `FEATURE_FLAG_STOCK_STOCK` was set to `false`, the "Put missing products on shopping list"-button was not visible
- Fixed that scanning a product barcode on the recipe ingredient edit page didn't work - Fixed that scanning a product barcode on the recipe ingredient edit page didn't work
- Fixed that the recipe edit button on the recipes page gallery view didn't work
### Meal plan ### Meal plan

View File

@ -341,6 +341,11 @@ $(".recipe-gallery-item").on("click", function(e)
} }
}); });
$(".recipe-edit-button").on("click", function(e)
{
e.stopPropagation();
});
$(".recipe-fullscreen").on('click', function(e) $(".recipe-fullscreen").on('click', function(e)
{ {
e.preventDefault(); e.preventDefault();

View File

@ -161,7 +161,7 @@
<tr id="recipe-row-{{ $recipe->id }}" <tr id="recipe-row-{{ $recipe->id }}"
data-recipe-id="{{ $recipe->id }}"> data-recipe-id="{{ $recipe->id }}">
<td class="fit-content border-right"> <td class="fit-content border-right">
<a class="btn btn-info btn-sm hide-when-embedded hide-on-fullscreen-card" <a class="btn btn-info btn-sm hide-when-embedded hide-on-fullscreen-card recipe-edit-button"
href="{{ $U('/recipe/') }}{{ $recipe->id }}" href="{{ $U('/recipe/') }}{{ $recipe->id }}"
data-toggle="tooltip" data-toggle="tooltip"
title="{{ $__t('Edit this item') }}"> title="{{ $__t('Edit this item') }}">
@ -280,7 +280,7 @@
title="{{ $__t('Delete this item') }}"> title="{{ $__t('Delete this item') }}">
<i class="fa-solid fa-trash"></i> <i class="fa-solid fa-trash"></i>
</a> </a>
<a class="btn btn-outline-info btn-xs hide-when-embedded hide-on-fullscreen-card" <a class="btn btn-outline-info btn-xs hide-when-embedded hide-on-fullscreen-card recipe-edit-button"
href="{{ $U('/recipe/') }}{{ $recipe->id }}" href="{{ $U('/recipe/') }}{{ $recipe->id }}"
data-toggle="tooltip" data-toggle="tooltip"
title="{{ $__t('Edit this item') }}"> title="{{ $__t('Edit this item') }}">