mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Optimized form input field navigation delay
This commit is contained in:
parent
c8ac094bf4
commit
a35db9f1d3
@ -52,7 +52,7 @@
|
||||
|
||||
### General
|
||||
|
||||
- xxx
|
||||
- Optimized than when navigating between form input fields via the keyboard (`TAB`) there was an unwanted delay at some places
|
||||
|
||||
### API
|
||||
|
||||
|
@ -882,3 +882,10 @@ $(document).on("click", '.btn, a, button', function(e)
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
});
|
||||
|
||||
// Delay only initial field focus
|
||||
Grocy.FormFocusDelay = 500;
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.FormFocusDelay = 0;
|
||||
}, 1000);
|
||||
|
@ -36,7 +36,7 @@ setTimeout(function()
|
||||
$("#camerabarcodescanner-start-button").attr("disabled", "");
|
||||
$("#camerabarcodescanner-start-button").addClass("disabled");
|
||||
$("#expected_barcode").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
if (GetUriParam("barcode") !== undefined)
|
||||
{
|
||||
@ -45,7 +45,7 @@ if (GetUriParam("barcode") !== undefined)
|
||||
{
|
||||
$("#expected_barcode").keyup();
|
||||
$("#scanned_barcode").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
|
||||
function OnBarcodeScanned(barcode)
|
||||
@ -82,7 +82,7 @@ function OnBarcodeScanned(barcode)
|
||||
{
|
||||
$("#scanned_barcode").focus();
|
||||
}
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
|
||||
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
|
@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesJournalTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
batteriesOverviewTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -106,5 +106,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('battery-form');
|
||||
|
@ -65,7 +65,7 @@ $('#battery_id').on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#tracked_time').find('input').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
|
||||
}
|
||||
@ -85,7 +85,7 @@ Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#battery_id_text_input').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$('#batterytracking-form input').keyup(function(event)
|
||||
{
|
||||
@ -134,7 +134,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
$("#battery_id_text_input").focus();
|
||||
$("#battery_id_text_input").blur();
|
||||
$('#tracked_time').find('input').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
function UndoChargeCycle(chargeCycleId)
|
||||
|
@ -115,7 +115,7 @@ Grocy.FrontendHelpers.ValidateForm('chore-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
if (Grocy.EditMode == "edit")
|
||||
{
|
||||
@ -144,7 +144,7 @@ setTimeout(function()
|
||||
$("#consume_product_on_execution").click();
|
||||
|
||||
Grocy.Components.ProductPicker.GetPicker().trigger('change');
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$('.input-group-chore-period-type').on('change keyup', function(e)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
choresTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
choresJournalTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
choresOverviewTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
@ -184,7 +184,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");
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ $('#chore_id').on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
||||
}
|
||||
@ -117,7 +117,7 @@ Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#chore_id_text_input').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$('#choretracking-form input').keyup(function(event)
|
||||
{
|
||||
@ -161,7 +161,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
$("#chore_id_text_input").focus();
|
||||
$("#chore_id_text_input").blur();
|
||||
$('#tracked_time').find('input').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
Grocy.Components.DateTimePicker.GetInputElement().on('keypress', function(e)
|
||||
|
@ -139,7 +139,7 @@ Grocy.Components.CameraBarcodeScanner.StartScanning = function()
|
||||
setTimeout(function()
|
||||
{
|
||||
$(".modal").last().modal("hide");
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
},
|
||||
addnewproduct: {
|
||||
@ -278,7 +278,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().select();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -379,7 +379,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
},
|
||||
function(xhr)
|
||||
@ -416,7 +416,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
Grocy.Components.ProductPicker.GetInputElement().focusout();
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
Grocy.Components.ProductPicker.GetInputElement().blur();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
$(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();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
@ -492,7 +492,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
if (productDetails.stock_amount == productDetails.stock_amount_opened || productDetails.product.enable_tare_weight_handling == 1 || productDetails.product.disable_open == 1)
|
||||
{
|
||||
@ -660,7 +660,7 @@ if (GetUriParam("embedded") !== undefined)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$(document).on("change", "#scan-mode", function(e)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
equipmentTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ Grocy.FrontendHelpers.ValidateForm('equipment-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$("#instruction-manual").on("change", function(e)
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
$('#display_amount').trigger('keyup');
|
||||
RefreshPriceHint();
|
||||
},
|
||||
@ -361,7 +361,7 @@ if (Grocy.Components.ProductPicker.InAnyFlow() === false && GetUriParam("embedde
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -373,7 +373,7 @@ else
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ $('#display_amount').on('focus', function(e)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -93,4 +93,4 @@ Grocy.FrontendHelpers.ValidateForm('location-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
locationsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#username').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
if (GetUriParam('invalid') === 'true')
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
apiKeysTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
@ -99,7 +99,7 @@ $("#add-api-key-modal").on("shown.bs.modal", function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#description").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
$("#new-api-key-button").on("click", function(e)
|
||||
|
@ -80,4 +80,4 @@ Grocy.FrontendHelpers.ValidateForm('mealplansection-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
mealplanSectionsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ Grocy.FrontendHelpers.ValidateForm('barcode-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#barcode').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
RefreshLocaleNumberInput();
|
||||
Grocy.Components.UserfieldsForm.Load()
|
||||
|
||||
|
@ -262,7 +262,7 @@ Grocy.FrontendHelpers.ValidateForm('product-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$(document).on('click', '.product-grocycode-label-print', function(e)
|
||||
{
|
||||
|
@ -78,5 +78,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('product-group-form');
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
groupsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
productsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#product-group-filter").on("change", function()
|
||||
{
|
||||
|
@ -355,7 +355,7 @@ if (Grocy.Components.ProductPicker !== undefined)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
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"))
|
||||
@ -501,7 +501,7 @@ if (Grocy.Components.ProductPicker)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -512,7 +512,7 @@ if (Grocy.Components.ProductPicker)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -524,7 +524,7 @@ $('#display_amount').on('focus', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ Grocy.FrontendHelpers.ValidateForm('quconversion-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#from_qu_id').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
if (GetUriParam("qu-unit") !== undefined)
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ Grocy.FrontendHelpers.ValidateForm('quantityunit-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$(document).on('click', '.qu-conversion-delete-button', function(e)
|
||||
{
|
||||
|
@ -37,4 +37,4 @@ if (GetUriParam("qu") !== undefined)
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#amount").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
quantityUnitsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ Grocy.FrontendHelpers.ValidateForm('recipe-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#name").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
$('#recipe-form input').keyup(function(event)
|
||||
{
|
||||
|
@ -124,14 +124,14 @@ if (!Grocy.Components.ProductPicker.InAnyFlow())
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#display_amount").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -143,7 +143,7 @@ else
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ $('#display_amount').on('focus', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -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");
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
shoppingListTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -82,5 +82,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('shopping-list-form');
|
||||
|
@ -213,7 +213,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglist-form');
|
||||
Grocy.ShoppingListItemFormInitialLoadDone = true;
|
||||
},
|
||||
@ -292,14 +292,14 @@ if (!Grocy.Components.ProductPicker.InAnyFlow())
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#display_amount").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -311,7 +311,7 @@ else
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form');
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
locationsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ function RefreshStockEntryRow(stockRowId)
|
||||
{
|
||||
RefreshContextualTimeago("#stock-" + stockRowId + "-row");
|
||||
RefreshLocaleNumberDisplay("#stock-" + stockRowId + "-row");
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
@ -148,5 +148,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm("stockentry-form");
|
||||
|
@ -74,7 +74,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
stockJournalTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
journalSummaryTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
stockOverviewTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$(document).on('click', '.product-grocycode-label-print', function(e)
|
||||
{
|
||||
@ -397,7 +397,7 @@ function RefreshProductRow(productId)
|
||||
{
|
||||
RefreshContextualTimeago("#product-" + productId + "-row");
|
||||
RefreshLocaleNumberDisplay("#product-" + productId + "-row");
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
categoriesTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -92,5 +92,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.FrontendHelpers.ValidateForm('task-category-form');
|
||||
|
@ -112,6 +112,6 @@ Grocy.Components.UserfieldsForm.Load();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
Grocy.Components.DateTimePicker.GetInputElement().trigger('input');
|
||||
Grocy.FrontendHelpers.ValidateForm('task-form');
|
||||
|
@ -18,7 +18,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
tasksTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#display_amount').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
@ -521,7 +521,7 @@ if (GetUriParam("embedded") !== undefined)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -538,4 +538,4 @@ if (GetUriParam("embedded") !== undefined)
|
||||
setTimeout(function()
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userentitiesTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ Grocy.FrontendHelpers.ValidateForm('userentity-form');
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
||||
// Click twice to trigger on-click but not change the actual checked state
|
||||
$("#show_in_sidebar_menu").click();
|
||||
|
@ -118,14 +118,14 @@ if (GetUriParam("entity"))
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#entity').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
|
||||
$("#type").trigger("change");
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userfieldsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#entity-filter").on("change", function()
|
||||
{
|
||||
@ -83,5 +83,5 @@ if (GetUriParam("entity"))
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#name").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ $("#change_password").click(function()
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#password").focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
});
|
||||
|
||||
if (GetUriParam("changepw") === "true")
|
||||
@ -158,7 +158,7 @@ else
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#username').focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
}
|
||||
|
||||
Grocy.Components.UserfieldsForm.Load();
|
||||
|
@ -74,4 +74,4 @@ $("#userfields-form").removeClass("border").removeClass("border-info").removeCla
|
||||
setTimeout(function()
|
||||
{
|
||||
$(".userfield-input").first().focus();
|
||||
}, 500);
|
||||
}, Grocy.FormFocusDelay);
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
userobjectsTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ $("#search").on("keyup", Delay(function()
|
||||
}
|
||||
|
||||
usersTable.search(value).draw();
|
||||
}, 500));
|
||||
}, Grocy.FormFocusDelay));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user