mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36: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-consume-button").attr('data-location-id',result.location_id);
|
||||
|
||||
var locationName = "";
|
||||
Grocy.Api.Get("objects/locations/" + result.location_id,
|
||||
function(locationResult)
|
||||
|
|
@ -174,6 +176,7 @@ function RefreshStockDetailRow(stockRowId)
|
|||
$('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500);
|
||||
$('#stock-' + stockRowId + '-location').fadeOut(500, function()
|
||||
{
|
||||
$(this).attr('data-location-id',result.location_id);
|
||||
$(this).text(locationName).fadeIn(500);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user