Unverified Commit 9f9e38ca authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

decrease contrast of past trains when a certain train is selected

parent 202fa0c6
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -105,6 +105,38 @@ function dbf_reg_handlers() {
		history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + trainElem.data('station') + suffix);
		dbf_show_moreinfo(trainElem, false);
	});
	const trainid = $(location).attr('hash').substr(1);
	if (trainid) {
		var found = false;
		$('div.app > ul > li').each(function(index) {
			if (found) {
				return;
			}
			$(this).find('.anchor').each(function() {
				if ($(this).attr('id') == trainid) {
					found = true;
				}
			});
		});
		if (found) {
			found = false;
			$('div.app > ul > li').each(function(index) {
				if (found) {
					return;
				}
				$(this).find('.anchor').each(function() {
					if ($(this).attr('id') == trainid) {
						found = true;
					}
				});
				if (found) {
					$(this).addClass('selected');
				} else {
					$(this).addClass('past');
				}
			});
		}
	}
}

$(function() {
+4 −0
Original line number Diff line number Diff line
@@ -266,6 +266,10 @@ div.app {
				background-color: $cancelled-bg-color;
			}

			&.past {
				background-color: $past-bg-color;
			}

			> a {
				color:$fg;
			}
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ $additional-stop-color: #77ff77;
$cancelled-stop-color: #ff7777;

$cancelled-bg-color: #512f00;
$past-bg-color: $bg1;

$firstclass-wagon-color: #333300;
$powercar-wagon-color: #222222;
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ $additional-stop-color: #009900;
$cancelled-stop-color: #cc0000;

$cancelled-bg-color: #ffe7d0;
$past-bg-color: $bg05;

$firstclass-wagon-color: #ffff99;
$powercar-wagon-color: #cccccc;