Optimized Userfield save event handling (fixes #2458)

This commit is contained in:
Bernd Bestel
2025-01-13 21:00:06 +01:00
parent a734d1c3ae
commit c8ccc0b529
26 changed files with 184 additions and 105 deletions

View File

@@ -512,7 +512,7 @@ $(document).on("click", ".remove-recipe-button, .remove-note-button, .remove-pro
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
});
@@ -540,7 +540,7 @@ $('#save-add-recipe-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -553,7 +553,7 @@ $('#save-add-recipe-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -582,7 +582,7 @@ $('#save-add-note-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -595,7 +595,7 @@ $('#save-add-note-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -630,7 +630,7 @@ $('#save-add-product-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -643,7 +643,7 @@ $('#save-add-product-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
}
@@ -843,7 +843,7 @@ $(document).on('click', '.product-consume-button', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
},
@@ -901,7 +901,7 @@ $(document).on('click', '.recipe-consume-button', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
},
@@ -967,7 +967,7 @@ $(document).on("click", ".mealplan-entry-done-button", function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
});
@@ -986,7 +986,7 @@ $(document).on("click", ".mealplan-entry-undone-button", function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
}
);
});