Changelog and code optimizations for pull request #420

This commit is contained in:
Bernd Bestel 2019-10-19 10:33:46 +02:00
parent a0fc06f6ed
commit da2c8d48ac
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 22 additions and 12 deletions

View File

@ -1,6 +1,7 @@
### Calendar improvements ### Calendar improvements
- Improved that meal plan events in the iCal calendar export now contain a link to the appropriate meal plan week in the body of the event (thanks @kriddles) - Improved that meal plan events in the iCal calendar export now contain a link to the appropriate meal plan week in the body of the event (thanks @kriddles)
### General & other fixes ### General & other improvements/fixes
- Fixed that the meal plan menu entry (sidebar) was not visible when the calendar was disabled (`FEATURE_FLAG_CALENDAR`) (thanks @lwis) - Fixed that the meal plan menu entry (sidebar) was not visible when the calendar was disabled (`FEATURE_FLAG_CALENDAR`) (thanks @lwis)
- Slightly optimized table loading & search performance (thanks @lwis) - Slightly optimized table loading & search performance (thanks @lwis)
- For integration: If a `GET` parameter `closeAfterCreation` is passed to the product edit page, the window will be closed on save (due to Browser restrictions, this only works when the window was opened from JavaScript) (thanks @Forceu)

View File

@ -49,7 +49,11 @@
Grocy.Api.UploadFile($("#product-picture")[0].files[0], 'productpictures', jsonData.picture_file_name, Grocy.Api.UploadFile($("#product-picture")[0].files[0], 'productpictures', jsonData.picture_file_name,
function(result) function(result)
{ {
if (redirectDestination == "reload") if (GetUriParam("closeAfterCreation") !== undefined)
{
window.close();
}
else if (redirectDestination == "reload")
{ {
window.location.reload(); window.location.reload();
} }
@ -67,14 +71,11 @@
} }
else else
{ {
/* If the GET parameter "closeAfterCreation" was passed to the form, it will if (GetUriParam("closeAfterCreation") !== undefined)
automatically close after creating the product. This only works if the window {
was opened with javascript */ window.close();
if (window.location.href.toLowerCase().includes("closeaftercreation")) }
{ else if (redirectDestination == "reload")
window.close();
}
if (redirectDestination == "reload")
{ {
window.location.reload(); window.location.reload();
} }
@ -119,7 +120,11 @@
Grocy.Api.UploadFile($("#product-picture")[0].files[0], 'productpictures', jsonData.picture_file_name, Grocy.Api.UploadFile($("#product-picture")[0].files[0], 'productpictures', jsonData.picture_file_name,
function(result) function(result)
{ {
if (redirectDestination == "reload") if (GetUriParam("closeAfterCreation") !== undefined)
{
window.close();
}
else if (redirectDestination == "reload")
{ {
window.location.reload(); window.location.reload();
} }
@ -137,7 +142,11 @@
} }
else else
{ {
if (redirectDestination == "reload") if (GetUriParam("closeAfterCreation") !== undefined)
{
window.close();
}
else if (redirectDestination == "reload")
{ {
window.location.reload(); window.location.reload();
} }