Only reload the page on external changes when there is no unsaved form data (fixes #73)

This commit is contained in:
Bernd Bestel
2018-09-30 09:57:42 +02:00
parent 77d82f22dc
commit d11dcb38fe
2 changed files with 14 additions and 1 deletions

View File

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