mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
More modal iframe dialog handling improvements
This commit is contained in:
parent
2c0b1a7be0
commit
a2c2049037
@ -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)
|
||||
|
@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesJournalTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesOverviewTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -107,5 +107,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm('battery-form');
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
choresTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
choresJournalTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
equipmentTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
$('#display_amount').trigger('keyup');
|
||||
RefreshPriceHint();
|
||||
},
|
||||
|
@ -93,4 +93,4 @@ Grocy.FrontendHelpers.ValidateForm('location-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
locationsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
apiKeysTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
mealplanSectionsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ Grocy.FrontendHelpers.ValidateForm('barcode-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#barcode').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
RefreshLocaleNumberInput();
|
||||
Grocy.Components.UserfieldsForm.Load()
|
||||
|
||||
|
@ -78,5 +78,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm('product-group-form');
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
groupsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
productsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#product-group-filter").on("change", function()
|
||||
{
|
||||
|
@ -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"))
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
quConversionsResolvedTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#quantity-unit-filter").on("change", function()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
quantityUnitsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
shoppingListTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -82,5 +82,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm('shopping-list-form');
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form');
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
locationsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ function RefreshStockEntryRow(stockRowId)
|
||||
{
|
||||
RefreshContextualTimeago("#stock-" + stockRowId + "-row");
|
||||
RefreshLocaleNumberDisplay("#stock-" + stockRowId + "-row");
|
||||
}, 600);
|
||||
}, 500);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
@ -148,5 +148,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#amount').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm("stockentry-form");
|
||||
|
@ -74,7 +74,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
stockJournalTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
journalSummaryTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
categoriesTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
Grocy.FrontendHelpers.ValidateForm('task-category-form');
|
||||
|
@ -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');
|
||||
|
@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
tasksTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userentitiesTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userfieldsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#entity-filter").on("change", function()
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ $("#change_password").click(function()
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#password").focus();
|
||||
}, 200);
|
||||
}, 500);
|
||||
});
|
||||
|
||||
if (GetUriParam("changepw") === "true")
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userobjectsTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
usersTable.search(value).draw();
|
||||
}, 200));
|
||||
}, 500));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user