From 99b1a06f4341bf251a293addfe9eedadd711c3ee Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 9 Jan 2025 18:32:51 +0100 Subject: Remove 'loading details' when details raise an error --- public/static/js/collapse.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/static/js') diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js index a94b227..4e70c7e 100644 --- a/public/static/js/collapse.js +++ b/public/static/js/collapse.js @@ -96,7 +96,8 @@ function dbf_show_moreinfo(trainElem, keep_old) { $.get(window.location.href, {train: trainElem.data('train'), jid: trainElem.data('jid'), ajax: 1}, function(data) { $('.moreinfo').html(data); }).fail(function() { - $('.moreinfo .mfooter').append('Der Zug ist abgefahren (Zug nicht gefunden)'); + $('.moreinfo .mfooter').append('Keine weiteren Details verfügbar'); + $('.moreinfo .loading').remove(); }); infoElem.removeClass('collapsed-moreinfo'); infoElem.addClass('expanded-moreinfo'); -- cgit v1.2.3