summaryrefslogtreecommitdiff
path: root/public/static/js/collapse.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-18 22:09:20 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-18 22:09:20 +0200
commit510070c82ce1207bd91c17a84e6bf68d07bb80e6 (patch)
treec0bb30ed1642de4fb59b307397bc1750f0c10f65 /public/static/js/collapse.js
parentf38ca208e00b5f463c261d3abe8ca93403f42a00 (diff)
update train details javascript handler for layout changes
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r--public/static/js/collapse.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js
index 099fefd..daa9fc0 100644
--- a/public/static/js/collapse.js
+++ b/public/static/js/collapse.js
@@ -21,25 +21,24 @@ function dbf_reg_handlers() {
$('.moreinfo .train-no').text(trainElem.data('no'));
$('.moreinfo .train-origin').text(trainElem.data('from'));
$('.moreinfo .train-dest').text(trainElem.data('to'));
- if ($('.moreinfo .loading').length == 0) {
- $('.moreinfo .mheader').append('<div class="loading">Lade Daten, bitte warten...</div>');
- }
$('.moreinfo .minfo').text('');
$('.moreinfo .mfooter').html('');
$('.moreinfo .verbose').html('');
$('.moreinfo .mroute').html('');
$('.moreinfo ul').html('');
- if (trainElem.data('platform') != '') {
- $('.moreinfo .mfooter').append('<div class="platforminfo">Gleis ' + trainElem.data('platform') + '</div>');
- }
var timebuf = '';
if (trainElem.data('arrival') != '') {
- timebuf += 'Ankunft: ' + trainElem.data('arrival') + '<br/>';
+ timebuf += '<div class="arrival">An: ' + trainElem.data('arrival') + '</div>';
}
if (trainElem.data('departure') != '') {
- timebuf += 'Abfahrt: ' + trainElem.data('departure');
+ timebuf += '<div class="departure">Ab: ' + trainElem.data('departure') + '</div>';
+ }
+ if (trainElem.data('platform') != '') {
+ $('.moreinfo .mfooter').append('<div class="platforminfo">Gleis ' + trainElem.data('platform') + timebuf + '</div>');
+ }
+ if ($('.moreinfo .loading').length == 0) {
+ $('.moreinfo .mfooter').append('<div class="loading">Lade Daten, bitte warten...</div>');
}
- $('.moreinfo .mfooter').append('<div class="timeinfo">' + timebuf + '</div>');
if (trainElem.data('moreinfo') != '') {
var ibuf = '';
for (var key in moreinfo) {