summaryrefslogtreecommitdiff
path: root/public/static/js/collapse.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-11-22 19:52:13 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-11-22 19:52:13 +0100
commit0f6870df13362a6af5d95a0fddd970559acb42bd (patch)
treea6e7136a6a4aef13aafa5f45f3126bba7b9f6095 /public/static/js/collapse.js
parentf8f4b9f1be84b54bedf8cf36a1c6a4ede89b362c (diff)
Fix train detail view for split stations3.4.9
Was broken when the train's station did not match the requested one
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r--public/static/js/collapse.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js
index 0d4652b..0418678 100644
--- a/public/static/js/collapse.js
+++ b/public/static/js/collapse.js
@@ -1,6 +1,6 @@
function reload_app() {
// TODO use a variable instead of window.location.href, as
- // window.locatin.href may be /z/...
+ // window.location.href may be /z/...
// Until then, we guard it by only reloading whin moreinfo is not expanded.
if ($('.expanded-moreinfo').length == 0) {
$.get(window.location.href, {ajax: 1}, function(data) {
@@ -88,7 +88,7 @@ function dbf_reg_handlers() {
$('div.app > ul > li').click(function() {
const trainElem = $(this);
const station = $('div.app').data('station');
- history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + station);
+ history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + trainElem.data('station'));
dbf_show_moreinfo(trainElem, false);
});
}