mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 11:27:03 +00:00
Fixed and optimized some things related to #421 (& some more cleanup)
This commit is contained in:
@@ -1,23 +1,4 @@
|
||||
$(document).ready(function() {
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
var locationId = GetUriParam('locationId');
|
||||
|
||||
if (typeof locationId === 'undefined')
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetPicker().trigger('change');
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
} else {
|
||||
|
||||
$("#location_id_from").val(locationId);
|
||||
$("#location_id_from").trigger('change');
|
||||
$("#use_specific_stock_entry").click();
|
||||
$("#use_specific_stock_entry").trigger('change');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#save-transfer-button').on('click', function(e)
|
||||
$('#save-transfer-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -440,3 +421,22 @@ function UndoStockTransaction(transactionId)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
var locationId = GetUriParam('locationId');
|
||||
|
||||
if (typeof locationId === 'undefined')
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetPicker().trigger('change');
|
||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$("#location_id_from").val(locationId);
|
||||
$("#location_id_from").trigger('change');
|
||||
$("#use_specific_stock_entry").click();
|
||||
$("#use_specific_stock_entry").trigger('change');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user