From 26775aa561b8071b1d7daf479a6b8d1964ead3ea Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 21 Aug 2020 21:00:46 +0200 Subject: [PATCH] Clear and hide tooltips when the conso/transfer page is cleared --- note_kfet/static/js/consos.js | 1 + note_kfet/static/js/transfer.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/note_kfet/static/js/consos.js b/note_kfet/static/js/consos.js index 2c5a09b6..1dbf4641 100644 --- a/note_kfet/static/js/consos.js +++ b/note_kfet/static/js/consos.js @@ -157,6 +157,7 @@ function reset() { $("#note_list").html(""); $("#consos_list").html(""); $("#user_note").text(""); + $("#user_note").attr("data-original-title", "").tooltip("hide"); $("#profile_pic").attr("src", "/media/pic/default.png"); $("#profile_pic_link").attr("href", "#"); refreshHistory(); diff --git a/note_kfet/static/js/transfer.js b/note_kfet/static/js/transfer.js index f26dbd85..aba8d684 100644 --- a/note_kfet/static/js/transfer.js +++ b/note_kfet/static/js/transfer.js @@ -22,10 +22,12 @@ function reset(refresh=true) { event.originalEvent = {charCode: 97}; source_field.trigger(event); source_field.removeClass('is-invalid'); + source_field.attr("data-original-title", "").tooltip("hide"); let dest_field = $("#dest_note"); dest_field.val(""); dest_field.trigger(event); dest_field.removeClass('is-invalid'); + dest_field.attr("data-original-title", "").tooltip("hide"); let amount_field = $("#amount"); amount_field.val(""); amount_field.removeClass('is-invalid');