Commit 0f6870df authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Fix train detail view for split stations

Was broken when the train's station did not match the requested one
parent f8f4b9f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1103,6 +1103,7 @@ sub handle_result {
							  $result->qos_messages
						],
					},
					station          => $result->station,
					moreinfo         => $moreinfo,
					delay            => $delay,
					route_pre        => [ $result->route_pre ],
+4 −4
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(/static/v37/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: url(/static/v38/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: local('Material Icons'),
       local('MaterialIcons-Regular'),
       url(/static/v37/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v37/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v37/fonts/MaterialIcons-Regular.ttf) format('truetype');
       url(/static/v38/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v38/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v38/fonts/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
+2 −2
Original line number Diff line number Diff line
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);
	});
}
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+0 −0

File moved.

Loading