mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Optimized button click tooltip hide handling (fixes #2206)
This commit is contained in:
parent
5ab31f726a
commit
8bdb74a8e0
@ -90,6 +90,7 @@
|
||||
|
||||
- Added a new `config.php` setting `ENERGY_UNIT` to customize the label to display energy values (was fixed `kcal` before and defaults to that, so no changed behavior when not configured)
|
||||
- Fixed that users were unable to delete their own API keys (when not having the `All permissions` permission)
|
||||
- Fixed that button tooltips on some places didn't disappear after clicking the corresponding button
|
||||
- New translations: (thanks all the translators)
|
||||
- Romanian (demo available at <https://ro.demo.grocy.info>)
|
||||
|
||||
|
@ -1233,9 +1233,7 @@ $('[data-toggle="tooltip"][data-html="true"]').on("shown.bs.tooltip", function()
|
||||
|
||||
$(document).on("click", "#clear-filter-button", function(e)
|
||||
{
|
||||
// Remove the focus from the current button
|
||||
// to prevent that the tooltip stays until clicked anywhere else
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
});
|
||||
|
||||
$(document).on("shown.bs.modal", function(e)
|
||||
|
@ -54,9 +54,7 @@ $(document).on('click', '.track-charge-cycle-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
@ -84,9 +84,7 @@ $(document).on('click', '.track-chore-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
@ -754,9 +754,7 @@ $(document).on("keydown", "#servings", function(e)
|
||||
|
||||
$(document).on('click', '.recipe-order-missing-button', function(e)
|
||||
{
|
||||
// Remove the focus from the current button
|
||||
// to prevent that the tooltip stays until clicked anywhere else
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var objectName = $(e.currentTarget).attr('data-recipe-name');
|
||||
var objectId = $(e.currentTarget).attr('data-recipe-id');
|
||||
@ -820,9 +818,7 @@ $(document).on('click', '.product-consume-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
@ -868,9 +864,7 @@ $(document).on('click', '.product-consume-button', function(e)
|
||||
|
||||
$(document).on('click', '.recipe-consume-button', function(e)
|
||||
{
|
||||
// Remove the focus from the current button
|
||||
// to prevent that the tooltip stays until clicked anywhere else
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var objectName = $(e.currentTarget).attr('data-recipe-name');
|
||||
var objectId = $(e.currentTarget).attr('data-recipe-id');
|
||||
@ -925,9 +919,7 @@ $(document).on('click', '.recipe-consume-button', function(e)
|
||||
|
||||
$(document).on("click", ".display-recipe-button", function(e)
|
||||
{
|
||||
// Remove the focus from the current button
|
||||
// to prevent that the tooltip stays until clicked anywhere else
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var objectId = $(e.currentTarget).attr('data-recipe-id');
|
||||
var servings = $(e.currentTarget).attr('data-mealplan-servings');
|
||||
@ -962,9 +954,7 @@ $(document).on("click", ".display-recipe-button", function(e)
|
||||
|
||||
$(document).on("click", ".display-product-button", function(e)
|
||||
{
|
||||
// Remove the focus from the current button
|
||||
// to prevent that the tooltip stays until clicked anywhere else
|
||||
document.activeElement.blur();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.Components.ProductCard.Refresh($(e.currentTarget).attr('data-product-id'));
|
||||
$("#mealplan-productcard-modal").modal("show");
|
||||
@ -974,9 +964,7 @@ $(document).on("click", ".mealplan-entry-done-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var mealPlanEntryId = $(e.currentTarget).attr("data-mealplan-entry-id");
|
||||
Grocy.Api.Put("objects/meal_plan/" + mealPlanEntryId, { "done": 1 },
|
||||
@ -995,9 +983,7 @@ $(document).on("click", ".mealplan-entry-undone-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var mealPlanEntryId = $(e.currentTarget).attr("data-mealplan-entry-id");
|
||||
Grocy.Api.Put("objects/meal_plan/" + mealPlanEntryId, { "done": 0 },
|
||||
|
@ -440,9 +440,7 @@ $(document).on('click', '.ingredient-done-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
$(e.currentTarget).parent().toggleClass("text-strike-through");
|
||||
});
|
||||
|
@ -121,9 +121,7 @@ $(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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var shoppingListItemId = $(e.currentTarget).attr('data-shoppinglist-id');
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
@ -253,9 +251,7 @@ $(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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
var href = $(e.currentTarget).attr('href');
|
||||
|
||||
@ -335,9 +331,7 @@ $(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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
@ -61,9 +61,7 @@ $(document).on('click', '.stock-consume-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
@ -110,9 +108,7 @@ $(document).on('click', '.product-open-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
@ -130,9 +130,7 @@ $(document).on('click', '.product-consume-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
@ -185,9 +183,7 @@ $(document).on('click', '.product-open-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
@ -54,9 +54,7 @@ $(document).on('click', '.do-task-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
@ -99,9 +97,7 @@ $(document).on('click', '.undo-task-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();
|
||||
$(".tooltip").tooltip("hide");
|
||||
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user