diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-21 19:11:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-21 19:11:52 +0100 |
commit | f9d1ea47ff7a444f4468aa4fbfade1120d500066 (patch) | |
tree | 661a76f6af08c97a7b8a23d7391b908064a2287f /public/static/js/collapse.js | |
parent | 1a6c3ad4ee00a22c684a4142784fc5e2d1a2bc26 (diff) |
keep detailed mode when following links; show train attributes in detailed mode3.8.1
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r-- | public/static/js/collapse.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js index 40900d1..1bfc398 100644 --- a/public/static/js/collapse.js +++ b/public/static/js/collapse.js @@ -94,7 +94,11 @@ 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') + '/' + trainElem.data('station')); + var suffix = ''; + if (window.location.href.includes('detailed=1')) { + suffix = '?detailed=1'; + } + history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + trainElem.data('station') + suffix); dbf_show_moreinfo(trainElem, false); }); } |