Fixed page reloads with unsaved form data and "Auto reload on external changes" enabled (fixes #265)

This commit is contained in:
Bernd Bestel 2019-06-09 08:58:46 +02:00
parent f736c4de44
commit a56f8be19e
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
- Fixed a problem that the user settings were not properly initialized for the frontend JS part when not logged only (so potentially affected only the login page)
- Fixed an issue that the shopping list did not load when a plural translation for a quantity unit was missing
- 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
- 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)
- 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!)

View File

@ -374,11 +374,11 @@ Grocy.FrontendHelpers.ShowGenericError = function(message, exception)
console.error(exception);
}
$("form").on("keyup paste", "input, textarea", function()
$(document).on("keyup paste change", "input, textarea", function()
{
$(this).closest("form").addClass("is-dirty");
});
$("form").on("click", "select", function()
$(document).on("click", "select", function()
{
$(this).closest("form").addClass("is-dirty");
});