summaryrefslogtreecommitdiff
path: root/public/static
diff options
context:
space:
mode:
Diffstat (limited to 'public/static')
-rw-r--r--public/static/js/collapse.js4
-rw-r--r--public/static/js/geostop.js6
2 files changed, 7 insertions, 3 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js
index 2db1089..d7d1e3b 100644
--- a/public/static/js/collapse.js
+++ b/public/static/js/collapse.js
@@ -113,7 +113,7 @@ function dbf_reg_handlers() {
if (param.get('detailed')) {
suffix += '&detailed=1';
}
- if (param.get('hafas')) {
+ if (param.get('hafas') && param.get('hafas') != '0') {
suffix += '&hafas=' + param.get('hafas') + '&highlight=' + trainElem.data('station');
}
if (param.get('past')) {
@@ -122,7 +122,7 @@ function dbf_reg_handlers() {
if (param.get('rt') || param.get('show_realtime')) {
suffix += '&rt=1';
}
- if (param.get('hafas')) {
+ if (param.get('hafas') && param.get('hafas') != '0') {
history.pushState({'page':'traindetail','jid':trainElem.data('jid')}, 'test', '/z/' + trainElem.data('jid') + suffix);
} else {
history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + trainElem.data('station') + suffix);
diff --git a/public/static/js/geostop.js b/public/static/js/geostop.js
index 00699ec..fa2d6f1 100644
--- a/public/static/js/geostop.js
+++ b/public/static/js/geostop.js
@@ -42,7 +42,11 @@ $(function() {
hafas = candidate.hafas;
const stationlink = $(document.createElement('a'));
- stationlink.attr('href', eva + '?hafas=' + hafas);
+ if (hafas) {
+ stationlink.attr('href', eva + '?hafas=' + hafas);
+ } else {
+ stationlink.attr('href', eva);
+ }
stationlink.text(name + ' ');
const distancenode = $(document.createElement('div'));