From d5020ff71932f56c992222e780798b702f86886d Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Thu, 26 Sep 2024 21:36:34 -0300 Subject: [PATCH] feat: create button tooltip on hover --- app/templates/transactions/fragments/item.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/templates/transactions/fragments/item.html b/app/templates/transactions/fragments/item.html index 6ed4f47..0f40201 100644 --- a/app/templates/transactions/fragments/item.html +++ b/app/templates/transactions/fragments/item.html @@ -60,6 +60,8 @@ hover:tw-bg-zinc-900 p-2 {% if transaction.account.is_asset %}tw-border-dashed{% hx-trigger='confirmed' _="on click send transaction_action_clicked to .transaction-action in the closest parent .transaction end on transaction_action_clicked call bootstrap.Tooltip.getOrCreateInstance(me).dispose() end + on mouseenter call bootstrap.Tooltip.getOrCreateInstance(me) end + on mouseleave call bootstrap.Tooltip.getOrCreateInstance(me).dispose() end on click call Swal.fire({title: '{% translate 'Are you sure?' %}', text: '{% blocktranslate %}You won\'t be able to revert this!{% endblocktranslate %}', @@ -82,7 +84,9 @@ hover:tw-bg-zinc-900 p-2 {% if transaction.account.is_asset %}tw-border-dashed{% hx-get="{% url 'transaction_edit' transaction_id=transaction.id %}" hx-target="#generic-offcanvas" _="on click send transaction_action_clicked to .transaction-action in the closest parent .transaction end - on transaction_action_clicked call bootstrap.Tooltip.getOrCreateInstance(me).dispose() end"> + on transaction_action_clicked call bootstrap.Tooltip.getOrCreateInstance(me).dispose() end + on mouseenter call bootstrap.Tooltip.getOrCreateInstance(me) end + on mouseleave call bootstrap.Tooltip.getOrCreateInstance(me).dispose() end">