More modal iframe dialog handling improvements

This commit is contained in:
Bernd Bestel 2025-01-11 15:41:04 +01:00
parent 2c0b1a7be0
commit a2c2049037
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
50 changed files with 60 additions and 60 deletions

View File

@ -36,7 +36,7 @@ setTimeout(function()
{
$("#barcodescanner-start-button").attr("disabled", "");
$("#barcodescanner-start-button").addClass("disabled");
}, 200);
}, 500);
if (GetUriParam("barcode") !== undefined)
{
@ -45,7 +45,7 @@ if (GetUriParam("barcode") !== undefined)
{
$("#expected_barcode").keyup();
$("#scanned_barcode").focus();
}, 200);
}, 500);
}
function OnBarcodeScanned(barcode)
@ -82,7 +82,7 @@ function OnBarcodeScanned(barcode)
{
$("#scanned_barcode").focus();
}
}, 200);
}, 500);
}
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)

View File

@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
}
batteriesTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -32,7 +32,7 @@ $("#search").on("keyup", Delay(function()
}
batteriesJournalTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -19,7 +19,7 @@ $("#search").on("keyup", Delay(function()
}
batteriesOverviewTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

@ -65,7 +65,7 @@ $('#battery_id').on('change', function(e)
setTimeout(function()
{
$('#tracked_time').find('input').focus();
}, 200);
}, 500);
Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
}
@ -131,7 +131,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
$("#battery_id_text_input").focus();
$("#battery_id_text_input").blur();
$('#tracked_time').find('input').focus();
}, 200);
}, 500);
});
function UndoChargeCycle(chargeCycleId)

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
choresTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -38,7 +38,7 @@ $("#search").on("keyup", Delay(function()
}
choresJournalTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -20,7 +20,7 @@ $("#search").on("keyup", Delay(function()
}
choresOverviewTable.search(value).draw();
}, 200));
}, 500));
$("#status-filter").on("change", function()
{
@ -186,7 +186,7 @@ $(document).on('click', '.track-chore-button', function(e)
// Refresh the DataTable to re-apply filters
choresOverviewTable.rows().invalidate().draw(false);
$(".input-group-filter").trigger("change");
}, 550);
}, 500);
},
function(xhr)
{

View File

@ -99,7 +99,7 @@ $('#chore_id').on('change', function(e)
setTimeout(function()
{
Grocy.Components.DateTimePicker.GetInputElement().focus();
}, 200);
}, 500);
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
}
@ -158,7 +158,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
$("#chore_id_text_input").focus();
$("#chore_id_text_input").blur();
$('#tracked_time').find('input').focus();
}, 200);
}, 500);
});
Grocy.Components.DateTimePicker.GetInputElement().on('keypress', function(e)

View File

@ -397,7 +397,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
Grocy.Components.ProductPicker.GetInputElement().focusout();
Grocy.Components.ProductPicker.GetInputElement().focus();
Grocy.Components.ProductPicker.GetInputElement().blur();
}, 200);
}, 500);
});
$(document).on("shown.bs.modal", function(e)

View File

@ -121,5 +121,5 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
Grocy.Components.RecipePicker.GetInputElement().focusout();
Grocy.Components.RecipePicker.GetInputElement().focus();
Grocy.Components.RecipePicker.GetInputElement().blur();
}, 200);
}, 500);
});

View File

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

View File

@ -105,7 +105,7 @@ $("#search").on("keyup", Delay(function()
}
equipmentTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
locationsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
apiKeysTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
mealplanSectionsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
groupsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -20,7 +20,7 @@ $("#search").on("keyup", Delay(function()
}
productsTable.search(value).draw();
}, 200));
}, 500));
$("#product-group-filter").on("change", function()
{

View File

@ -346,7 +346,7 @@ if (Grocy.Components.ProductPicker !== undefined)
setTimeout(function()
{
$('#display_amount').focus();
}, 200);
}, 500);
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

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
quConversionsResolvedTable.search(value).draw();
}, 200));
}, 500));
$("#quantity-unit-filter").on("change", function()
{

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
quantityUnitsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

@ -82,7 +82,7 @@ $("#search").on("keyup", Delay(function()
$(".recipe-gallery-item").removeClass("d-none");
$(".recipe-gallery-item .card-title-search:not(:contains_case_insensitive(" + value + "))").parent().parent().parent().addClass("d-none");
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -43,7 +43,7 @@ $("#search").on("keyup", Delay(function()
}
shoppingListTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
locationsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -302,7 +302,7 @@ function RefreshStockEntryRow(stockRowId)
{
RefreshContextualTimeago("#stock-" + stockRowId + "-row");
RefreshLocaleNumberDisplay("#stock-" + stockRowId + "-row");
}, 600);
}, 500);
},
function(xhr)
{

View File

@ -148,5 +148,5 @@ Grocy.Components.UserfieldsForm.Load();
setTimeout(function()
{
$('#amount').focus();
}, 200);
}, 500);
Grocy.FrontendHelpers.ValidateForm("stockentry-form");

View File

@ -74,7 +74,7 @@ $("#search").on("keyup", Delay(function()
}
stockJournalTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -55,7 +55,7 @@ $("#search").on("keyup", Delay(function()
}
journalSummaryTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -108,7 +108,7 @@ $("#search").on("keyup", Delay(function()
}
stockOverviewTable.search(value).draw();
}, 200));
}, 500));
$(document).on('click', '.product-grocycode-label-print', function(e)
{
@ -382,7 +382,7 @@ function RefreshProductRow(productId)
{
RefreshContextualTimeago("#product-" + productId + "-row");
RefreshLocaleNumberDisplay("#product-" + productId + "-row");
}, 600);
}, 500);
},
function(xhr)
{

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
categoriesTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

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

View File

@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
}
tasksTable.search(value).draw();
}, 200));
}, 500));
$("#status-filter").on("change", function()
{

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
userentitiesTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

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

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
userfieldsTable.search(value).draw();
}, 200));
}, 500));
$("#entity-filter").on("change", function()
{

View File

@ -146,7 +146,7 @@ $("#change_password").click(function()
setTimeout(function()
{
$("#password").focus();
}, 200);
}, 500);
});
if (GetUriParam("changepw") === "true")

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
userobjectsTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{

View File

@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
}
usersTable.search(value).draw();
}, 200));
}, 500));
$("#clear-filter-button").on("click", function()
{