Commit bcc02b19 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

deploy new back-button navigation for train details

parent 1feda8ae
Loading
Loading
Loading
Loading
+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/v33/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: url(/static/v34/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: local('Material Icons'),
       local('MaterialIcons-Regular'),
       url(/static/v33/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v33/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v33/fonts/MaterialIcons-Regular.ttf) format('truetype');
       url(/static/v34/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v34/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v34/fonts/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ function dbf_reg_handlers() {
		const moreinfo = trainElem.data('moreinfo').split('|');
		const this_href = window.location.href;
		const station = $('div.app').data('station');
		// TODO get station name...
		history.pushState({'page':'traindetail','train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + station);
		$('.moreinfo').each(function() {
			var infoElem = $(this);
@@ -122,7 +121,6 @@ $(function() {
		history.replaceState({'page':'station'}, document.title, '');
	}
	window.onpopstate = function(event) {
		console.log('pop ' + document.location + ' ' + JSON.stringify(event.state));
		if ((event.state != null) && (event.state['page'] == 'station')) {
			$('.moreinfo').each(function() {
				$(this).removeClass('expanded-moreinfo');
@@ -132,6 +130,8 @@ $(function() {
				$('div.app').append('<ul></ul>');
				reload_app();
			}
		} else {
			console.log("unhandled popstate! " + document.location);
		}
	};
});
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+0 −0

File moved.

+0 −5
Original line number Diff line number Diff line
@@ -213,10 +213,5 @@
          </li>
%       }
      </ul> <!-- mroute -->
%   }
%   if (param('ajax')) {
      <div style="margin-top: 1em;">
        <a class="smallbutton" href="/z/<%= $departure->{train_type} %>%20<%= $departure->{train_no} %>/<%= $station_name %>"><i class="material-icons" aria-hidden="true">share</i> Link</a>
      </div>
%   }
    </div> <!-- mfooter -->
Loading