diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 327bcd61..871411f5 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -28,12 +28,12 @@ var calendar = $("#calendar").fullCalendar({ { UpdateUriParam("week", view.start.format("YYYY-MM-DD")); } - + $(".fc-day-header").append(''); var weekRecipeName = view.start.year().toString() + "-" + (view.start.week() - 1).toString(); var weekRecipe = FindObjectInArrayByPropertyValue(internalRecipes, "name", weekRecipeName); - + var weekCosts = 0; var weekRecipeOrderMissingButtonHtml = ""; var weekRecipeConsumeButtonHtml = ""; @@ -103,9 +103,10 @@ var calendar = $("#calendar").fullCalendar({ \ \ \ + \ \ '); - + if (recipe.picture_file_name && !recipe.picture_file_name.isEmpty()) { element.html(element.html() + '') @@ -262,7 +263,7 @@ $(document).on('click', '.recipe-consume-button', function(e) { var objectName = $(e.currentTarget).attr('data-recipe-name'); var objectId = $(e.currentTarget).attr('data-recipe-id'); - + bootbox.confirm({ message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', objectName), buttons: { @@ -298,3 +299,25 @@ $(document).on('click', '.recipe-consume-button', function(e) } }); }); + +$(document).on("click", ".recipe-popup-button", function(e) +{ + var objectId = $(e.currentTarget).attr('data-recipe-id'); + + bootbox.dialog({ + message: '', + size: 'large', + backdrop: true, + closeButton: false, + buttons: { + cancel: { + label: __t('Cancel'), + className: 'btn-secondary responsive-button', + callback: function() + { + bootbox.hideAll(); + } + } + } + }); +});