Added more product actions on the stock overview page (closes #327)

This commit is contained in:
Bernd Bestel
2019-09-20 13:37:53 +02:00
parent ca9b8d068a
commit a95d6be4f4
20 changed files with 557 additions and 238 deletions

View File

@@ -348,6 +348,11 @@ Grocy.FrontendHelpers = { };
Grocy.FrontendHelpers.ValidateForm = function(formId)
{
var form = document.getElementById(formId);
if (form === null || form === undefined)
{
return;
}
if (form.checkValidity() === true)
{
$(form).find(':submit').removeClass('disabled');
@@ -544,3 +549,17 @@ if (!Grocy.CalendarFirstDayOfWeek.isEmpty())
}
});
}
$(window).on("message", function(e)
{
var data = e.originalEvent.data;
if (data.Message === "ShowSuccessMessage")
{
toastr.success(data.Payload);
}
else if (data.Message === "CloseAllModals")
{
bootbox.hideAll();
}
});