mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
HTML: Make theme colors consistent.
Buttons and fields colors must be consistent in different themes. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1494ea9727
commit
5b9537222e
2 changed files with 11 additions and 4 deletions
|
@ -134,6 +134,7 @@ window.onload=function(){
|
||||||
|
|
||||||
//translate Page
|
//translate Page
|
||||||
translate_page();
|
translate_page();
|
||||||
|
getDefaultColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeAdvSearch(e){
|
function changeAdvSearch(e){
|
||||||
|
|
|
@ -666,13 +666,11 @@ function toggleStats()
|
||||||
var stats_button = document.getElementById('stats_button');
|
var stats_button = document.getElementById('stats_button');
|
||||||
if (statsShows) {
|
if (statsShows) {
|
||||||
statsShows = false;
|
statsShows = false;
|
||||||
stats_button.style.backgroundColor = "#dfdfdf";
|
|
||||||
document.getElementById('diveListPanel').style.display = 'block';
|
document.getElementById('diveListPanel').style.display = 'block';
|
||||||
document.getElementById('diveStat').style.display = 'none';
|
document.getElementById('diveStat').style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('diveListPanel').style.display = 'none';
|
document.getElementById('diveListPanel').style.display = 'none';
|
||||||
document.getElementById('diveStat').style.display = 'block';
|
document.getElementById('diveStat').style.display = 'block';
|
||||||
stats_button.style.backgroundColor = "#5f7f8f";
|
|
||||||
statsShows = true;
|
statsShows = true;
|
||||||
showStats();
|
showStats();
|
||||||
}
|
}
|
||||||
|
@ -717,7 +715,15 @@ function stats_row_unhighlight(row)
|
||||||
//trips
|
//trips
|
||||||
|
|
||||||
var tripsShown;
|
var tripsShown;
|
||||||
|
var HEADER_COLOR;
|
||||||
|
var BACKGROUND_COLOR;
|
||||||
|
|
||||||
|
function getDefaultColor(){
|
||||||
|
var header = document.getElementById('header');
|
||||||
|
var button = document.getElementById('no_dives_selector');
|
||||||
|
HEADER_COLOR = document.defaultView.getComputedStyle(header).getPropertyValue('background-color');
|
||||||
|
BACKGROUND_COLOR = document.defaultView.getComputedStyle(button).getPropertyValue('background-color');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*This is the main function called to show/hide trips
|
*This is the main function called to show/hide trips
|
||||||
|
@ -727,11 +733,11 @@ function toggleTrips()
|
||||||
var trip_button = document.getElementById('trip_button');
|
var trip_button = document.getElementById('trip_button');
|
||||||
if (tripsShown) {
|
if (tripsShown) {
|
||||||
tripsShown = false;
|
tripsShown = false;
|
||||||
trip_button.style.backgroundColor = "#dfdfdf";
|
trip_button.style.backgroundColor = BACKGROUND_COLOR;
|
||||||
viewInPage();
|
viewInPage();
|
||||||
} else {
|
} else {
|
||||||
showtrips();
|
showtrips();
|
||||||
trip_button.style.backgroundColor = "#5f7f8f";
|
trip_button.style.backgroundColor = HEADER_COLOR;
|
||||||
tripsShown = true;
|
tripsShown = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue