Load userobject forms in dialogs

This commit is contained in:
Bernd Bestel
2020-11-17 21:18:05 +01:00
parent 639ffe13f5
commit 2b4d8a7cc5
2 changed files with 20 additions and 6 deletions

View File

@@ -15,7 +15,14 @@
Grocy.EditObjectId = result.created_object_id;
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
if (GetUriParam("embedded") !== undefined)
{
window.parent.postMessage(WindowMessageBag("Reload"), Grocy.BaseUrl);
}
else
{
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
}
});
},
function(xhr)
@@ -32,7 +39,14 @@
{
Grocy.Components.UserfieldsForm.Save(function()
{
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
if (GetUriParam("embedded") !== undefined)
{
window.parent.postMessage(WindowMessageBag("Reload"), Grocy.BaseUrl);
}
else
{
window.location.href = U('/userobjects/' + Grocy.EditObjectParentName);
}
});
},
function(xhr)