diff --git a/public/css/grocy.css b/public/css/grocy.css index 937d1586..3ddb9d27 100644 --- a/public/css/grocy.css +++ b/public/css/grocy.css @@ -61,6 +61,7 @@ a.discrete-link:focus { left: 0; overflow: auto; background-color: #ffffff; + width: 100%; } /* Fixes smooth scrolling on iOS */ @@ -498,3 +499,18 @@ canvas.drawingBuffer { width: 1.25rem; height: 1.25rem; } + +.recipe-card-name { + font-size: 16px; + text-align: center; + width: 100%; +} + +.recipe-expand { + right: 1.25rem; + top: .75rem; +} + +.recipe-servings-input { + width: 125px; +} \ No newline at end of file diff --git a/public/viewjs/recipeform.js b/public/viewjs/recipeform.js index f6e6eb2a..ae2d4e33 100644 --- a/public/viewjs/recipeform.js +++ b/public/viewjs/recipeform.js @@ -326,13 +326,21 @@ $('#save-recipe-include-button').on('click', function(e) } }); +$("#recipe-picture").on("change", function (e) { + $("#recipe-picture-label").removeClass("d-none"); + $("#recipe-picture-label-none").addClass("d-none"); + $("#delete-current-recipe-picture-on-save-hint").addClass("d-none"); + $("#current-recipe-picture").addClass("d-none"); + Grocy.DeleteRecipePictureOnSave = false; +}); + Grocy.DeleteRecipePictureOnSave = false; -$('#delete-current-recipe-picture-button').on('click', function (e) -{ - Grocy.DeleteRecipePictureOnSave = true; - $("#current-recipe-picture").addClass("d-none"); - $("#delete-current-recipe-picture-on-save-hint").removeClass("d-none"); - $("#delete-current-recipe-picture-button").addClass("disabled"); +$("#delete-current-recipe-picture-button").on("click", function (e) { + Grocy.DeleteRecipePictureOnSave = true; + $("#current-recipe-picture").addClass("d-none"); + $("#delete-current-recipe-picture-on-save-hint").removeClass("d-none"); + $("#recipe-picture-label").addClass("d-none"); + $("#recipe-picture-label-none").removeClass("d-none"); }); Grocy.Components.UserfieldsForm.Load(); diff --git a/views/recipeform.blade.php b/views/recipeform.blade.php index 3a71ac30..f9b8d63b 100644 --- a/views/recipeform.blade.php +++ b/views/recipeform.blade.php @@ -47,11 +47,26 @@
{{ $__t('The current picture will be deleted when you save the recipe') }}
+ @else +{{ $__t('No picture available') }}
+ @endif +{{ $__t('The current picture will be deleted when you save the recipe') }}
- @else -{{ $__t('No picture available') }}
- @endif -