Add tooltips to shopping list item buttons (closes #572)

This commit is contained in:
Bernd Bestel
2020-04-13 18:26:53 +02:00
parent 886721e972
commit 840b35b30d
3 changed files with 27 additions and 3 deletions

View File

@@ -92,6 +92,10 @@ $(document).on('click', '.shoppinglist-delete-button', function(e)
{
e.preventDefault();
// Remove the focus from the current button
// to prevent that the tooltip stays until clicked anywhere else
document.activeElement.blur();
var shoppingListItemId = $(e.currentTarget).attr('data-shoppinglist-id');
Grocy.FrontendHelpers.BeginUiBusy();
@@ -173,6 +177,10 @@ $(document).on('click', '.shopping-list-stock-add-workflow-list-item-button', fu
{
e.preventDefault();
// Remove the focus from the current button
// to prevent that the tooltip stays until clicked anywhere else
document.activeElement.blur();
var href = $(e.currentTarget).attr('href');
$("#shopping-list-stock-add-workflow-purchase-form-frame").attr("src", href);
@@ -248,6 +256,10 @@ $(document).on('click', '.order-listitem-button', function(e)
{
e.preventDefault();
// Remove the focus from the current button
// to prevent that the tooltip stays until clicked anywhere else
document.activeElement.blur();
Grocy.FrontendHelpers.BeginUiBusy();
var listItemId = $(e.currentTarget).attr('data-item-id');