mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed single quotes problem in all pickers (fixes #264)
This commit is contained in:
parent
a56f8be19e
commit
825be63b93
@ -4,5 +4,6 @@
|
||||
- Fixed that tooltips were visible forever when consuming all products on the stock overview page
|
||||
- Fixed that login did not work when "Stay logged in permanently" was set on grocy runs on a 32-bit system (thanks @matejdro)
|
||||
- Fixed page reloads when "Auto reload on external changes" is enabled and there is unsaved form data (the detection did not work on forms in modal dialogs, e. g. when adding a entry to the meal plan)
|
||||
- Fixed (again) that the product picker did not work properly when the product name contains single quotes
|
||||
- Improved that errors/messages from the API are shown properly when undoing a stock booking is not possible (stock journal page)
|
||||
- Improved night mode CSS (done by @BlizzWave, thanks!)
|
||||
|
@ -43,7 +43,7 @@ $('.location-combobox').combobox({
|
||||
var prefillByName = Grocy.Components.LocationPicker.GetPicker().parent().data('prefill-by-name').toString();
|
||||
if (typeof prefillByName !== "undefined")
|
||||
{
|
||||
possibleOptionElement = $("#location_id option:contains('" + prefillByName + "')").first();
|
||||
possibleOptionElement = $("#location_id option:contains(\"" + prefillByName + "\")").first();
|
||||
|
||||
if (possibleOptionElement.length > 0)
|
||||
{
|
||||
|
@ -70,10 +70,10 @@ if (!prefillProduct2.isEmpty())
|
||||
}
|
||||
if (typeof prefillProduct !== "undefined")
|
||||
{
|
||||
var possibleOptionElement = $("#product_id option[data-additional-searchdata*='" + prefillProduct.replace("'", "\\'") + "']").first();
|
||||
var possibleOptionElement = $("#product_id option[data-additional-searchdata*=\"" + prefillProduct + "\"]").first();
|
||||
if (possibleOptionElement.length === 0)
|
||||
{
|
||||
possibleOptionElement = $("#product_id option:contains('" + prefillProduct + "')").first();
|
||||
possibleOptionElement = $("#product_id option:contains(\"" + prefillProduct + "\")").first();
|
||||
}
|
||||
|
||||
if (possibleOptionElement.length > 0)
|
||||
@ -120,7 +120,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
}
|
||||
|
||||
var input = $('#product_id_text_input').val().toString();
|
||||
var possibleOptionElement = $("#product_id option[data-additional-searchdata*='" + input.replace("'", "\\'") + "']").first();
|
||||
var possibleOptionElement = $("#product_id option[data-additional-searchdata*=\"" + input + "\"]").first();
|
||||
|
||||
if (GetUriParam('addbarcodetoselection') === undefined && possibleOptionElement.length > 0)
|
||||
{
|
||||
@ -135,7 +135,7 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
return;
|
||||
}
|
||||
|
||||
var optionElement = $("#product_id option:contains('" + input + "')").first();
|
||||
var optionElement = $("#product_id option:contains(\"" + input + "\")").first();
|
||||
if (input.length > 0 && optionElement.length === 0 && typeof GetUriParam('addbarcodetoselection') === "undefined")
|
||||
{
|
||||
var addProductWorkflowsAdditionalCssClasses = "";
|
||||
|
@ -43,7 +43,7 @@ $('.recipe-combobox').combobox({
|
||||
var prefillByName = Grocy.Components.RecipePicker.GetPicker().parent().data('prefill-by-name').toString();
|
||||
if (typeof prefillByName !== "undefined")
|
||||
{
|
||||
possibleOptionElement = $("#recipe_id option:contains('" + prefillByName + "')").first();
|
||||
possibleOptionElement = $("#recipe_id option:contains(\"" + prefillByName + "\")").first();
|
||||
|
||||
if (possibleOptionElement.length > 0)
|
||||
{
|
||||
|
@ -42,10 +42,10 @@ $('.user-combobox').combobox({
|
||||
var prefillUser = Grocy.Components.UserPicker.GetPicker().parent().data('prefill-by-username').toString();
|
||||
if (typeof prefillUser !== "undefined")
|
||||
{
|
||||
var possibleOptionElement = $("#user_id option[data-additional-searchdata*='" + prefillUser.replace("'", "\\'") + "']").first();
|
||||
var possibleOptionElement = $("#user_id option[data-additional-searchdata*=\"" + prefillUser + "\"]").first();
|
||||
if (possibleOptionElement.length === 0)
|
||||
{
|
||||
possibleOptionElement = $("#user_id option:contains('" + prefillUser + "')").first();
|
||||
possibleOptionElement = $("#user_id option:contains(\"" + prefillUser + "\")").first();
|
||||
}
|
||||
|
||||
if (possibleOptionElement.length > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user