diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-19 09:52:03 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-19 09:52:03 +0200 |
commit | 1c68e7dcd6c5569569f4c320cfbd4625ec137994 (patch) | |
tree | 9661389022143996a29c58122ead9c0bc61e925d /public/static/js/collapse.js | |
parent | ba1429382f8e0521d5c454f4ff9dc32868a1a935 (diff) |
detail view: more prominent display of arrival, departure, and platform3.1.10
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r-- | public/static/js/collapse.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js index daa9fc0..3dcb2e6 100644 --- a/public/static/js/collapse.js +++ b/public/static/js/collapse.js @@ -26,16 +26,23 @@ function dbf_reg_handlers() { $('.moreinfo .verbose').html(''); $('.moreinfo .mroute').html(''); $('.moreinfo ul').html(''); - var timebuf = ''; + var dataline = ''; if (trainElem.data('arrival') != '') { - timebuf += '<div class="arrival">An: ' + trainElem.data('arrival') + '</div>'; - } - if (trainElem.data('departure') != '') { - timebuf += '<div class="departure">Ab: ' + trainElem.data('departure') + '</div>'; + dataline += '<div><div class="arrival">An: ' + trainElem.data('arrival') + '</div></div>'; + } else { + dataline += '<div><div class="arrival"></div></div>'; } if (trainElem.data('platform') != '') { - $('.moreinfo .mfooter').append('<div class="platforminfo">Gleis ' + trainElem.data('platform') + timebuf + '</div>'); + dataline += '<div><div class="platform">Gleis ' + trainElem.data('platform') + '</div></div>'; + } else { + dataline += '<div><div class="platform"></div></div>'; + } + if (trainElem.data('departure') != '') { + dataline += '<div><div class="departure">Ab: ' + trainElem.data('departure') + '</div></div>'; + } else { + dataline += '<div><div class="departure"></div></div>'; } + $('.moreinfo .mfooter').append('<div class="dataline">' + dataline + '</div>'); if ($('.moreinfo .loading').length == 0) { $('.moreinfo .mfooter').append('<div class="loading">Lade Daten, bitte warten...</div>'); } |