More modal iframe dialog handling improvements

This commit is contained in:
Bernd Bestel 2025-01-11 12:06:15 +01:00
parent 5721c4bd62
commit 2c0b1a7be0
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
54 changed files with 110 additions and 79 deletions

View File

@ -542,7 +542,16 @@ ResizeResponsiveEmbeds = function()
{ {
$("iframe.embed-responsive").each(function() $("iframe.embed-responsive").each(function()
{ {
$(this).attr("height", $(this)[0].contentWindow.document.body.scrollHeight.toString() + "px"); var iframeBody = $(this)[0].contentWindow.document.body;
if (iframeBody)
{
$(this).attr("height", iframeBody.scrollHeight.toString() + "px");
}
if ($("body").hasClass("fullscreen-card"))
{
$(this).attr("height", $("body").height().toString() + "px");
}
}); });
var maxHeight = $("body").height() - $("#mainNav").outerHeight() - 62; var maxHeight = $("body").height() - $("#mainNav").outerHeight() - 62;
@ -550,7 +559,7 @@ ResizeResponsiveEmbeds = function()
{ {
maxHeight = $("body").height(); maxHeight = $("body").height();
} }
$("embed.embed-responsive").attr("height", maxHeight.toString() + "px"); $("embed.embed-responsive:not(.resize-done)").attr("height", maxHeight.toString() + "px").addClass("resize-done");
} }
$(window).on("resize", function() $(window).on("resize", function()
{ {
@ -564,6 +573,10 @@ $(document).on("shown.bs.modal", function(e)
{ {
ResizeResponsiveEmbeds(); ResizeResponsiveEmbeds();
}); });
$(document).on("hidden.bs.modal", function(e)
{
$("body").removeClass("fullscreen-card");
});
$("body").children().each(function(index, child) $("body").children().each(function(index, child)
{ {
new ResizeObserver(function() new ResizeObserver(function()
@ -705,8 +718,8 @@ if (Grocy.CalendarFirstDayOfWeek)
if (GetUriParam("embedded")) if (GetUriParam("embedded"))
{ {
$("body").append('<div class="fixed-top"> \ $("body").append('<div class="fixed-top" style="left: unset;"> \
<button class="btn btn-light float-right close-last-modal-button" \ <button class="btn btn-light btn-sm close-last-modal-button" \
type="button" \> \ type="button" \> \
<i class="fa-solid fa-xmark"></i> \ <i class="fa-solid fa-xmark"></i> \
</button> \ </button> \
@ -737,7 +750,7 @@ $(window).on("message", function(e)
} }
else if (data.Message == "CloseLastModal") else if (data.Message == "CloseLastModal")
{ {
$(".modal").last().modal("hide"); $(".modal:visible").last().modal("hide");
} }
else if (data.Message == "ResizeResponsiveEmbeds") else if (data.Message == "ResizeResponsiveEmbeds")
{ {
@ -753,11 +766,15 @@ $(window).on("message", function(e)
} }
else if (data.Message == "BroadcastMessage") else if (data.Message == "BroadcastMessage")
{ {
// data.Payload is the original WindowMessageBag => distribute to this window + all child iframes // data.Payload is the original WindowMessageBag
// => Send the original message to this window
window.postMessage(data.Payload, Grocy.BaseUrl); window.postMessage(data.Payload, Grocy.BaseUrl);
// => Bubble the broadcast message down to all child iframes
$("iframe.embed-responsive").each(function() $("iframe.embed-responsive").each(function()
{ {
$(this)[0].contentWindow.postMessage(data.Payload, Grocy.BaseUrl); $(this)[0].contentWindow.postMessage(data, Grocy.BaseUrl);
}); });
} }
}); });

View File

@ -107,5 +107,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('battery-form'); Grocy.FrontendHelpers.ValidateForm('battery-form');

View File

@ -141,7 +141,7 @@ setTimeout(function()
$("#consume_product_on_execution").click(); $("#consume_product_on_execution").click();
Grocy.Components.ProductPicker.GetPicker().trigger('change'); Grocy.Components.ProductPicker.GetPicker().trigger('change');
}, 100); }, 200);
$('.input-group-chore-period-type').on('change keyup', function(e) $('.input-group-chore-period-type').on('change keyup', function(e)
{ {

View File

@ -43,11 +43,15 @@ $("#search").on("keyup", Delay(function()
$("#clear-filter-button").on("click", function() $("#clear-filter-button").on("click", function()
{ {
$("#search").val(""); $("#search").val("");
$("#chore-filter").val("all");
$("#daterange-filter").val("24"); $("#daterange-filter").val("24");
RemoveUriParam("months"); RemoveUriParam("months");
if (GetUriParam("embedded") === undefined)
{
$("#chore-filter").val("all");
RemoveUriParam("chore"); RemoveUriParam("chore");
}
window.location.reload(); window.location.reload();
}); });

View File

@ -495,7 +495,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
setTimeout(function() setTimeout(function()
{ {
$('#display_amount').focus(); $('#display_amount').focus();
}, 150); }, 200);
if (productDetails.stock_amount == productDetails.stock_amount_opened || productDetails.product.enable_tare_weight_handling == 1) if (productDetails.stock_amount == productDetails.stock_amount_opened || productDetails.product.enable_tare_weight_handling == 1)
{ {

View File

@ -159,6 +159,7 @@ $(".selectedEquipmentInstructionManualToggleFullscreenButton").on('click', funct
card.find(".card-header").toggleClass("fixed-top"); card.find(".card-header").toggleClass("fixed-top");
card.find(".card-body").toggleClass("mt-5"); card.find(".card-body").toggleClass("mt-5");
$("body").toggleClass("fullscreen-card"); $("body").toggleClass("fullscreen-card");
$("embed.embed-responsive").removeClass("resize-done");
ResizeResponsiveEmbeds(); ResizeResponsiveEmbeds();
}); });

View File

@ -314,7 +314,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
setTimeout(function() setTimeout(function()
{ {
$('#display_amount').focus(); $('#display_amount').focus();
}, 150); }, 200);
$('#display_amount').trigger('keyup'); $('#display_amount').trigger('keyup');
RefreshPriceHint(); RefreshPriceHint();
}, },

View File

@ -93,4 +93,4 @@ Grocy.FrontendHelpers.ValidateForm('location-form');
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);

View File

@ -927,6 +927,8 @@ $(document).on("click", ".display-recipe-button", function(e)
Grocy.Api.Put('objects/recipes/' + objectId, { "desired_servings": servings }, Grocy.Api.Put('objects/recipes/' + objectId, { "desired_servings": servings },
function(result) function(result)
{ {
$("body").addClass("fullscreen-card");
bootbox.dialog({ bootbox.dialog({
message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + objectId + '#fullscreen"></iframe>', message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + objectId + '#fullscreen"></iframe>',
size: 'extra-large', size: 'extra-large',

View File

@ -99,7 +99,7 @@ Grocy.FrontendHelpers.ValidateForm('barcode-form');
setTimeout(function() setTimeout(function()
{ {
$('#barcode').focus(); $('#barcode').focus();
}, 150); }, 200);
RefreshLocaleNumberInput(); RefreshLocaleNumberInput();
Grocy.Components.UserfieldsForm.Load() Grocy.Components.UserfieldsForm.Load()

View File

@ -78,5 +78,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('product-group-form'); Grocy.FrontendHelpers.ValidateForm('product-group-form');

View File

@ -346,7 +346,7 @@ if (Grocy.Components.ProductPicker !== undefined)
setTimeout(function() setTimeout(function()
{ {
$('#display_amount').focus(); $('#display_amount').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('purchase-form'); Grocy.FrontendHelpers.ValidateForm('purchase-form');
if (GetUriParam("flow") === "shoppinglistitemtostock" && BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled) && Grocy.FrontendHelpers.ValidateForm("purchase-form")) if (GetUriParam("flow") === "shoppinglistitemtostock" && BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled) && Grocy.FrontendHelpers.ValidateForm("purchase-form"))

View File

@ -124,14 +124,14 @@ if (!Grocy.Components.ProductPicker.InAnyFlow())
setTimeout(function() setTimeout(function()
{ {
$("#display_amount").focus(); $("#display_amount").focus();
}, 150); }, 200);
} }
else else
{ {
setTimeout(function() setTimeout(function()
{ {
Grocy.Components.ProductPicker.GetInputElement().focus(); Grocy.Components.ProductPicker.GetInputElement().focus();
}, 150); }, 200);
} }
} }
else else
@ -143,7 +143,7 @@ else
setTimeout(function() setTimeout(function()
{ {
Grocy.Components.ProductPicker.GetInputElement().focus(); Grocy.Components.ProductPicker.GetInputElement().focus();
}, 150); }, 200);
} }
} }

View File

@ -290,6 +290,8 @@ recipesTables.on('select', function(e, dt, type, indexes)
} }
else else
{ {
$("body").addClass("fullscreen-card");
bootbox.dialog({ bootbox.dialog({
message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>', message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>',
size: 'extra-large', size: 'extra-large',
@ -322,6 +324,8 @@ $(".recipe-gallery-item").on("click", function(e)
} }
else else
{ {
$("body").addClass("fullscreen-card");
bootbox.dialog({ bootbox.dialog({
message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>', message: '<iframe class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>',
size: 'extra-large', size: 'extra-large',

View File

@ -272,6 +272,7 @@ $(document).on('click', '#add-all-items-to-stock-button', function(e)
Grocy.ShoppingListAddToStockButtonList = $(".shopping-list-stock-add-workflow-list-item-button"); Grocy.ShoppingListAddToStockButtonList = $(".shopping-list-stock-add-workflow-list-item-button");
Grocy.ShoppingListToStockWorkflowCount = Grocy.ShoppingListAddToStockButtonList.length; Grocy.ShoppingListToStockWorkflowCount = Grocy.ShoppingListAddToStockButtonList.length;
Grocy.ShoppingListToStockWorkflowCurrent++; Grocy.ShoppingListToStockWorkflowCurrent++;
$("#shopping-list-stock-add-workflow-modal .modal-footer").removeClass("d-none");
$(".shopping-list-stock-add-workflow-list-item-button").first().click(); $(".shopping-list-stock-add-workflow-list-item-button").first().click();
}); });
@ -281,6 +282,7 @@ $("#shopping-list-stock-add-workflow-modal").on("hidden.bs.modal", function(e)
Grocy.ShoppingListToStockWorkflowCount = 0; Grocy.ShoppingListToStockWorkflowCount = 0;
Grocy.ShoppingListToStockWorkflowCurrent = 0; Grocy.ShoppingListToStockWorkflowCurrent = 0;
Grocy.ShoppingListAddToStockButtonList = []; Grocy.ShoppingListAddToStockButtonList = [];
$("#shopping-list-stock-add-workflow-modal .modal-footer").addClass("d-none");
}) })
$(window).on("message", function(e) $(window).on("message", function(e)
@ -445,6 +447,7 @@ $(document).on("click", "#print-shopping-list-button", function(e)
title: __t('Printing'), title: __t('Printing'),
message: '<p><i class="fa fa-spin fa-spinner"></i> ' + __t('Connecting to printer...') + '</p>' message: '<p><i class="fa fa-spin fa-spinner"></i> ' + __t('Connecting to printer...') + '</p>'
}); });
//Delaying for one second so that the alert can be closed //Delaying for one second so that the alert can be closed
setTimeout(function() setTimeout(function()
{ {

View File

@ -82,5 +82,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('shopping-list-form'); Grocy.FrontendHelpers.ValidateForm('shopping-list-form');

View File

@ -213,7 +213,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
setTimeout(function() setTimeout(function()
{ {
$('#display_amount').focus(); $('#display_amount').focus();
}, 150); }, 300);
Grocy.FrontendHelpers.ValidateForm('shoppinglist-form'); Grocy.FrontendHelpers.ValidateForm('shoppinglist-form');
Grocy.ShoppingListItemFormInitialLoadDone = true; Grocy.ShoppingListItemFormInitialLoadDone = true;
}, },
@ -292,14 +292,14 @@ if (!Grocy.Components.ProductPicker.InAnyFlow())
setTimeout(function() setTimeout(function()
{ {
$("#display_amount").focus(); $("#display_amount").focus();
}, 150); }, 300);
} }
else else
{ {
setTimeout(function() setTimeout(function()
{ {
Grocy.Components.ProductPicker.GetInputElement().focus(); Grocy.Components.ProductPicker.GetInputElement().focus();
}, 150); }, 200);
} }
} }
else else
@ -311,7 +311,7 @@ else
setTimeout(function() setTimeout(function()
{ {
Grocy.Components.ProductPicker.GetInputElement().focus(); Grocy.Components.ProductPicker.GetInputElement().focus();
}, 150); }, 200);
} }
} }

View File

@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form'); Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form');

View File

@ -31,7 +31,12 @@ $("#clear-filter-button").on("click", function()
{ {
$("#location-filter").val("all"); $("#location-filter").val("all");
$("#location-filter").trigger("change"); $("#location-filter").trigger("change");
if (GetUriParam("embedded") === undefined)
{
Grocy.Components.ProductPicker.Clear(); Grocy.Components.ProductPicker.Clear();
}
stockEntriesTable.draw(); stockEntriesTable.draw();
}); });
@ -311,11 +316,7 @@ $(window).on("message", function(e)
{ {
var data = e.originalEvent.data; var data = e.originalEvent.data;
if (data.Message == "StockEntryChanged") if (data.Message == "ProductChanged")
{
RefreshStockEntryRow(data.Payload);
}
else if (data.Message == "ProductChanged")
{ {
window.location.reload(); window.location.reload();
} }
@ -328,7 +329,6 @@ function UndoStockBookingEntry(bookingId, stockRowId, productId)
Grocy.Api.Post('stock/bookings/' + bookingId.toString() + '/undo', {}, Grocy.Api.Post('stock/bookings/' + bookingId.toString() + '/undo', {},
function(result) function(result)
{ {
window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("StockEntryChanged", stockRowId)), Grocy.BaseUrl);
window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("ProductChanged", productId)), Grocy.BaseUrl); window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("ProductChanged", productId)), Grocy.BaseUrl);
toastr.success(__t("Booking successfully undone")); toastr.success(__t("Booking successfully undone"));
}, },

View File

@ -62,7 +62,6 @@
{ {
var successMessage = __t('Stock entry successfully updated') + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockBookingEntry(\'' + result.id + '\',\'' + Grocy.EditObjectRowId + '\')"><i class="fa-solid fa-undo"></i> ' + __t("Undo") + '</a>'; var successMessage = __t('Stock entry successfully updated') + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockBookingEntry(\'' + result.id + '\',\'' + Grocy.EditObjectRowId + '\')"><i class="fa-solid fa-undo"></i> ' + __t("Undo") + '</a>';
window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("StockEntryChanged", Grocy.EditObjectRowId)), Grocy.BaseUrl);
window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("ProductChanged", Grocy.EditObjectProductId)), Grocy.BaseUrl); window.top.postMessage(WindowMessageBag("BroadcastMessage", WindowMessageBag("ProductChanged", Grocy.EditObjectProductId)), Grocy.BaseUrl);
window.parent.postMessage(WindowMessageBag("ShowSuccessMessage", successMessage), Grocy.BaseUrl); window.parent.postMessage(WindowMessageBag("ShowSuccessMessage", successMessage), Grocy.BaseUrl);
window.parent.postMessage(WindowMessageBag("Ready"), Grocy.BaseUrl); window.parent.postMessage(WindowMessageBag("Ready"), Grocy.BaseUrl);
@ -149,5 +148,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#amount').focus(); $('#amount').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm("stockentry-form"); Grocy.FrontendHelpers.ValidateForm("stockentry-form");

View File

@ -82,11 +82,15 @@ $("#clear-filter-button").on("click", function()
$("#transaction-type-filter").val("all"); $("#transaction-type-filter").val("all");
$("#location-filter").val("all"); $("#location-filter").val("all");
$("#user-filter").val("all"); $("#user-filter").val("all");
$("#product-filter").val("all");
$("#daterange-filter").val("6"); $("#daterange-filter").val("6");
RemoveUriParam("months"); RemoveUriParam("months");
if (GetUriParam("embedded") === undefined)
{
RemoveUriParam("product"); RemoveUriParam("product");
$("#product-filter").val("all");
}
window.location.reload(); window.location.reload();
}); });

View File

@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('task-category-form'); Grocy.FrontendHelpers.ValidateForm('task-category-form');

View File

@ -112,6 +112,6 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.Components.DateTimePicker.GetInputElement().trigger('input'); Grocy.Components.DateTimePicker.GetInputElement().trigger('input');
Grocy.FrontendHelpers.ValidateForm('task-form'); Grocy.FrontendHelpers.ValidateForm('task-form');

View File

@ -283,7 +283,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
setTimeout(function() setTimeout(function()
{ {
$('#display_amount').focus(); $('#display_amount').focus();
}, 150); }, 200);
}, },
function(xhr) function(xhr)
{ {

View File

@ -103,7 +103,7 @@ $("#show_in_sidebar_menu").on("click", function()
setTimeout(function() setTimeout(function()
{ {
$('#name').focus(); $('#name').focus();
}, 150); }, 200);
Grocy.FrontendHelpers.ValidateForm('userentity-form'); Grocy.FrontendHelpers.ValidateForm('userentity-form');
// Click twice to trigger on-click but not change the actual checked state // Click twice to trigger on-click but not change the actual checked state

View File

@ -4,7 +4,7 @@
@section('content') @section('content')
<div class="row"> <div class="row">
<div class="col-12 col-md-6 text-center"> <div class="col text-center">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<hr class="my-2"> <hr class="my-2">

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -34,7 +34,7 @@
data-status-filter="duesoon" data-status-filter="duesoon"
data-next-x-days="{{ $nextXDays }}" data-next-x-days="{{ $nextXDays }}"
class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div> class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div>
<div class="float-right mt-1"> <div class="float-right mt-1 @if($embedded) pr-5 @endif">
<a class="btn btn-sm btn-outline-info d-md-none" <a class="btn btn-sm btn-outline-info d-md-none"
data-toggle="collapse" data-toggle="collapse"
href="#table-filter-row" href="#table-filter-row"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -39,7 +39,7 @@
data-user-filter="xx{{ GROCY_USER_ID }}xx" data-user-filter="xx{{ GROCY_USER_ID }}xx"
class="secondary-message user-filter-message responsive-button"></div> class="secondary-message user-filter-message responsive-button"></div>
@endif @endif
<div class="float-right mt-1"> <div class="float-right mt-1 @if($embedded) pr-5 @endif">
<a class="btn btn-sm btn-outline-info d-md-none" <a class="btn btn-sm btn-outline-info d-md-none"
data-toggle="collapse" data-toggle="collapse"
href="#table-filter-row" href="#table-filter-row"

View File

@ -9,7 +9,7 @@
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="title-related-links border-bottom mb-2 py-1"> <div class="title-related-links border-bottom mb-2 py-1">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -14,7 +14,7 @@
<span class="text-muted font-italic small">{{ $__t('Product') }} <strong>{{ $product->name }}</strong></span> <span class="text-muted font-italic small">{{ $__t('Product') }} <strong>{{ $product->name }}</strong></span>
@endif @endif
</h2> </h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2" <button class="btn btn-outline-dark d-md-none mt-2"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -41,7 +41,7 @@
<div class="@if(boolval($userSettings['recipes_show_list_side_by_side']) || $embedded) col-12 col-md-6 @else col @endif d-print-none"> <div class="@if(boolval($userSettings['recipes_show_list_side_by_side']) || $embedded) col-12 col-md-6 @else col @endif d-print-none">
<div class="title-related-links border-bottom mb-2 py-1"> <div class="title-related-links border-bottom mb-2 py-1">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -29,7 +29,7 @@
<span class="text-muted small">{!! $__t('%s total value', '<span class="locale-number locale-number-currency">' . SumArrayValue($listItems, 'last_price_total') . '</span>') !!}</span> <span class="text-muted small">{!! $__t('%s total value', '<span class="locale-number locale-number-currency">' . SumArrayValue($listItems, 'last_price_total') . '</span>') !!}</span>
</h2> </h2>
@endif @endif
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-primary responsive-button d-md-none mt-2 order-1 order-md-3 show-as-dialog-link" <button class="btn btn-primary responsive-button d-md-none mt-2 order-1 order-md-3 show-as-dialog-link"
href="{{ $U('/shoppinglistitem/new?embedded&list=' . $selectedShoppingListId) }}"> href="{{ $U('/shoppinglistitem/new?embedded&list=' . $selectedShoppingListId) }}">
{{ $__t('Add item') }} {{ $__t('Add item') }}
@ -333,15 +333,12 @@
class="embed-responsive"> class="embed-responsive">
</iframe> </iframe>
</div> </div>
<div class="modal-footer"> <div class="modal-footer d-none">
<span id="shopping-list-stock-add-workflow-purchase-item-count" <span id="shopping-list-stock-add-workflow-purchase-item-count"
class="d-none mr-auto"></span> class="d-none mr-auto"></span>
<button id="shopping-list-stock-add-workflow-skip-button" <button id="shopping-list-stock-add-workflow-skip-button"
type="button" type="button"
class="btn btn-primary">{{ $__t('Skip') }}</button> class="btn btn-primary">{{ $__t('Skip') }}</button>
<button type="button"
class="btn btn-secondary"
data-dismiss="modal">{{ $__t('Close') }}</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -12,7 +12,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"
@ -27,7 +27,7 @@
<div class="row collapse d-md-flex" <div class="row collapse d-md-flex"
id="table-filter-row"> id="table-filter-row">
<div class="col-12 col-md-6 col-xl-3"> <div class="col-12 col-md-6 col-xl-3 hide-when-embedded">
@include('components.productpicker', array( @include('components.productpicker', array(
'products' => $products, 'products' => $products,
'disallowAllProductWorkflows' => true, 'disallowAllProductWorkflows' => true,

View File

@ -7,7 +7,7 @@
@section('content') @section('content')
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"
@ -45,7 +45,7 @@
placeholder="{{ $__t('Search') }}"> placeholder="{{ $__t('Search') }}">
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-xl-3"> <div class="col-12 col-md-6 col-xl-3 hide-when-embedded">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa-solid fa-filter"></i>&nbsp;{{ $__t('Product') }}</span> <span class="input-group-text"><i class="fa-solid fa-filter"></i>&nbsp;{{ $__t('Product') }}</span>

View File

@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"
@ -34,7 +34,7 @@
placeholder="{{ $__t('Search') }}"> placeholder="{{ $__t('Search') }}">
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-xl-3"> <div class="col-12 col-md-6 col-xl-3 hide-when-embedded">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa-solid fa-filter"></i>&nbsp;{{ $__t('Product') }}</span> <span class="input-group-text"><i class="fa-solid fa-filter"></i>&nbsp;{{ $__t('Product') }}</span>

View File

@ -72,7 +72,7 @@
<div id="info-missing-products" <div id="info-missing-products"
data-status-filter="belowminstockamount" data-status-filter="belowminstockamount"
class="normal-message status-filter-message responsive-button"></div> class="normal-message status-filter-message responsive-button"></div>
<div class="float-right mt-1"> <div class="float-right mt-1 @if($embedded) pr-5 @endif">
<a class="btn btn-sm btn-outline-info d-md-none" <a class="btn btn-sm btn-outline-info d-md-none"
data-toggle="collapse" data-toggle="collapse"
href="#table-filter-row" href="#table-filter-row"

View File

@ -11,7 +11,7 @@
<h2 class="title mr-2 order-0"> <h2 class="title mr-2 order-0">
@yield('title') @yield('title')
</h2> </h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -34,7 +34,7 @@
data-status-filter="duesoon" data-status-filter="duesoon"
data-next-x-days="{{ $nextXDays }}" data-next-x-days="{{ $nextXDays }}"
class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div> class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div>
<div class="float-right mt-1"> <div class="float-right mt-1 @if($embedded) pr-5 @endif">
<a class="btn btn-sm btn-outline-info d-md-none" <a class="btn btn-sm btn-outline-info d-md-none"
data-toggle="collapse" data-toggle="collapse"
href="#table-filter-row" href="#table-filter-row"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -14,7 +14,7 @@
<h2 class="mb-0 mr-auto order-3 order-md-1 width-xs-sm-100"> <h2 class="mb-0 mr-auto order-3 order-md-1 width-xs-sm-100">
<span class="text-muted small">{{ $userentity->description }}</span> <span class="text-muted small">{{ $userentity->description }}</span>
</h2> </h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"

View File

@ -9,7 +9,7 @@
<div class="col"> <div class="col">
<div class="title-related-links"> <div class="title-related-links">
<h2 class="title">@yield('title')</h2> <h2 class="title">@yield('title')</h2>
<div class="float-right"> <div class="float-right @if($embedded) pr-5 @endif">
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" <button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
type="button" type="button"
data-toggle="collapse" data-toggle="collapse"