mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
RefreshStockDetailRow refresh location-id
This commit is contained in:
parent
2ee9b2286e
commit
045a33f0db
|
|
@ -160,6 +160,8 @@ function RefreshStockDetailRow(stockRowId)
|
||||||
});
|
});
|
||||||
$('#stock-' + stockRowId + '-best-before-date-timeago').attr('datetime', result.best_before_date + ' 23:59:59');
|
$('#stock-' + stockRowId + '-best-before-date-timeago').attr('datetime', result.best_before_date + ' 23:59:59');
|
||||||
|
|
||||||
|
$(".stock-consume-button").attr('data-location-id',result.location_id);
|
||||||
|
|
||||||
var locationName = "";
|
var locationName = "";
|
||||||
Grocy.Api.Get("objects/locations/" + result.location_id,
|
Grocy.Api.Get("objects/locations/" + result.location_id,
|
||||||
function(locationResult)
|
function(locationResult)
|
||||||
|
|
@ -174,6 +176,7 @@ function RefreshStockDetailRow(stockRowId)
|
||||||
$('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500);
|
$('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500);
|
||||||
$('#stock-' + stockRowId + '-location').fadeOut(500, function()
|
$('#stock-' + stockRowId + '-location').fadeOut(500, function()
|
||||||
{
|
{
|
||||||
|
$(this).attr('data-location-id',result.location_id);
|
||||||
$(this).text(locationName).fadeIn(500);
|
$(this).text(locationName).fadeIn(500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user