Hide the dive-related controls when showing trips

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2015-06-17 21:46:39 +02:00 committed by Dirk Hohndel
parent cfd001702f
commit b052d63789

View file

@ -750,14 +750,20 @@ function getDefaultColor(){
function toggleTrips()
{
var trip_button = document.getElementById('trip_button');
var controller = document.getElementById('controller');
var no_dives_selector = document.getElementById('no_dives_selector');
if (tripsShown) {
tripsShown = false;
trip_button.style.backgroundColor = BACKGROUND_COLOR;
viewInPage();
controller.style.display = '';
no_dives_selector.style.display = '';
} else {
showtrips();
trip_button.style.backgroundColor = HEADER_COLOR;
tripsShown = true;
dives_controller.style.display = 'none';
no_dives_selector.style.display = 'none';
}
}