mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed addnewproduct productpicker flow shopping list selection on return (fixes #1646)
This commit is contained in:
parent
286351b6d2
commit
787c885ccf
@ -3,3 +3,4 @@
|
|||||||
- Fixed that the "Stay logged in permanently" checkbox on the login page had no effect (thanks @0)
|
- Fixed that the "Stay logged in permanently" checkbox on the login page had no effect (thanks @0)
|
||||||
- Fixed that the labels of context-/more-menu items were not readable in Night Mode (thanks @corbolais)
|
- Fixed that the labels of context-/more-menu items were not readable in Night Mode (thanks @corbolais)
|
||||||
- Fixed that auto night mode over midnight did not always work
|
- Fixed that auto night mode over midnight did not always work
|
||||||
|
- Fixed that the "Add as new product" productpicker workflow, started from the shopping list item form, always selected the default shopping list after finishing the flow
|
||||||
|
@ -208,6 +208,12 @@ $('#product_id_text_input').on('blur', function(e)
|
|||||||
className: 'btn-success add-new-product-dialog-button responsive-button ' + addProductWorkflowsAdditionalCssClasses,
|
className: 'btn-success add-new-product-dialog-button responsive-button ' + addProductWorkflowsAdditionalCssClasses,
|
||||||
callback: function()
|
callback: function()
|
||||||
{
|
{
|
||||||
|
// Not the best place here - this is only relevant when this flow is started from the shopping list item form
|
||||||
|
// (to select the correct shopping list on return)
|
||||||
|
if (GetUriParam("list") !== undefined)
|
||||||
|
{
|
||||||
|
embedded += "&list=" + GetUriParam("list");
|
||||||
|
}
|
||||||
|
|
||||||
Grocy.Components.ProductPicker.PopupOpen = false;
|
Grocy.Components.ProductPicker.PopupOpen = false;
|
||||||
window.location.href = U('/product/new?flow=InplaceNewProductWithName&name=' + encodeURIComponent(input) + '&returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative + "?flow=InplaceNewProductWithName&" + embedded) + "&" + embedded);
|
window.location.href = U('/product/new?flow=InplaceNewProductWithName&name=' + encodeURIComponent(input) + '&returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative + "?flow=InplaceNewProductWithName&" + embedded) + "&" + embedded);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user