diff --git a/templates/base.html b/templates/base.html index d57dab89..43f1ae5f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -86,7 +86,8 @@ SPDX-License-Identifier: GPL-3.0-or-later {% if user.is_authenticated %}
Historique des transactions récentes @@ -279,31 +279,25 @@ "destination": {{ button.destination.pk }}, "category": {{ button.category.id }}, "template": {{ button.id }} - }, reloadWithTurbolinks); + }, function () { + consos = []; + $("#note_list").html(""); + $("#alias_matched").html(""); + refreshHistory(); + refreshBalance(); + }); }); - - reloadWithTurbolinks(); }); {% endif %} {% endfor %} }); - var reloadWithTurbolinks = (function () { - var scrollPosition; + function refreshBalance() { + $("#user_balance").load("/ #user_balance"); + } - function reload () { - scrollPosition = [window.scrollX, window.scrollY]; - Turbolinks.visit(window.location.toString(), { action: 'replace' }) - } - - document.addEventListener('turbolinks:load', function () { - if (scrollPosition) { - window.scrollTo.apply(window, scrollPosition); - scrollPosition = null; - } - }); - - return reload; - })(); + function refreshHistory() { + $("#history").load("/note/consos/ #history"); + } {% endblock %}