Commit 7928ebbb authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Small color fixes

parent 41adb94d
......@@ -57,7 +57,7 @@ function dt_button_indicator(element)
this.div.innerHTML =
"<button type='button' id='" + this.button_element + "'>" +
"<div style='display:inline-block; margin: 0px 5px 0px 1px; border:1px solid black; width:10px; height:10px' id='" + this.button_ind_element + "'></div>" +
"<div style='display:inline-block; margin: 0px 4px 0px 0px; border:1px solid black; width:10px; height:10px' id='" + this.button_ind_element + "'></div>" +
"<div style='display:inline-block' id='" + this.button_div_element + "'></div>" +
"</button>";
this.button = document.getElementById(this.button_element);
......
......@@ -1142,38 +1142,41 @@ function do_shell(command)
*
******************************************************************/
var auth_color_inactive = "grey";
var auth_color_active = "lime";
var auth_idle = new dt_button_indicator("auth_idle");
auth_idle.indicator("#b0b0b0");
auth_idle.indicator(auth_color_inactive);
auth_idle.value("Idle");
auth_idle.click(function() { do_auth('console/idle');} );
var auth_azel = new dt_button_indicator("auth_azel");
auth_azel.indicator("#b0b0b0");
auth_azel.indicator(auth_color_inactive);
auth_azel.value("Azimuth & Elevation");
auth_azel.click(function() { do_auth('console/azel');} );
var auth_j2000 = new dt_button_indicator("auth_j2000");
auth_j2000.indicator("#b0b0b0");
auth_j2000.indicator(auth_color_inactive);
auth_j2000.value("J2000");
auth_j2000.click(function() { do_auth('console/j2000tracker');} );
var auth_moon = new dt_button_indicator("auth_moon");
auth_moon.indicator("#b0b0b0");
auth_moon.indicator(auth_color_inactive);
auth_moon.value("Moon");
auth_moon.click(function() { do_auth('console/moontracker');} );
var auth_sun = new dt_button_indicator("auth_sun");
auth_sun.indicator("#b0b0b0");
auth_sun.indicator(auth_color_inactive);
auth_sun.value("Sun");
auth_sun.click(function() { do_auth('console/suntracker');} );
var auth_sat = new dt_button_indicator("auth_sat");
auth_sat.indicator("#b0b0b0");
auth_sat.indicator(auth_color_inactive);
auth_sat.value("Satellite");
auth_sat.click(function() { do_auth('console/sattracker');} );
var auth_manual = new dt_button_indicator("auth_manual");
auth_manual.indicator("#b0b0b0");
auth_manual.indicator(auth_color_inactive);
auth_manual.value("Manual");
auth_manual.click(function() { do_auth('console/manual');} );
......@@ -1347,18 +1350,18 @@ function dt_auth_status_line(obj, line, azimuth_off, elevation_off)
spg_sun.style.background = "grey";
spg_moon.style.background = "grey";
spg_manual.style.background = "grey";
auth_idle.indicator("#b0b0b0");
auth_azel.indicator("#b0b0b0");
auth_j2000.indicator("#b0b0b0");
auth_sat.indicator("#b0b0b0");
auth_moon.indicator("#b0b0b0");
auth_sun.indicator("#b0b0b0");
auth_manual.indicator("#b0b0b0");
auth_idle.indicator(auth_color_inactive);
auth_azel.indicator(auth_color_inactive);
auth_j2000.indicator(auth_color_inactive);
auth_sat.indicator(auth_color_inactive);
auth_moon.indicator(auth_color_inactive);
auth_sun.indicator(auth_color_inactive);
auth_manual.indicator(auth_color_inactive);
if (line == "console/azel") {
azel_do_cp_pos();
spg_azel.style.background = "lightgrey";
auth_azel.indicator("lightgreen");
auth_azel.indicator(auth_color_active);
spg_azel.style.display = 'block';
} else {
spg_azel.style.display = 'none';
......@@ -1366,37 +1369,37 @@ function dt_auth_status_line(obj, line, azimuth_off, elevation_off)
if (line == "console/j2000tracker") {
j2000_do_cp_pos();
spg_j2000.style.background = "lightgrey";
auth_j2000.indicator("lightgreen");
auth_j2000.indicator(auth_color_active);
spg_j2000.style.display = 'block';
} else {
spg_j2000.style.display = 'none';
}
if (line == "console/sattracker") {
spg_sat.style.background = "lightgrey";
auth_sat.indicator("lightgreen");
auth_sat.indicator(auth_color_active);
spg_sat.style.display = 'block';
} else {
spg_sat.style.display = 'none';
}
if (line == "console/idle") {
auth_idle.indicator("lightgreen");
auth_idle.indicator(auth_color_active);
}
if (line == "console/moontracker") {
spg_moon.style.background = "lightgrey";
auth_moon.indicator("lightgreen");
auth_moon.indicator(auth_color_active);
spg_moon.style.display = 'block';
} else {
spg_moon.style.display = 'none';
}
if (line == "console/suntracker") {
spg_sun.style.background = "lightgrey";
auth_sun.indicator("lightgreen");
auth_sun.indicator(auth_color_active);
spg_sun.style.display = 'block';
} else {
spg_sun.style.display = 'none';
}
if (line == "console/manual") {
auth_manual.indicator("lightgreen");
auth_manual.indicator(auth_color_active);
spg_manual.style.background = "lightgrey";
manual_spg_active = 1;
spg_manual.style.display = 'block';
......@@ -1591,7 +1594,7 @@ function j2000_status_cb(
switchtype=j2000_refraction_enabled;
if (switch_array[i].split('=')[1].charAt(0) == '1')
switchtype.indicator("lightgreen");
switchtype.indicator("lime");
else
switchtype.indicator("red");
}
......@@ -1740,7 +1743,7 @@ function sat_status_cb(switches)
if (switchset == true) {
if (switch_array[i].split('=')[1].charAt(0) == '1')
switchtype.indicator("lightgreen");
switchtype.indicator("lime");
else
switchtype.indicator("red");
}
......@@ -1855,7 +1858,7 @@ function sun_status_cb(switches)
if (switchset == true) {
if (switch_array[i].split('=')[1].charAt(0) == '1')
switchtype.indicator("lightgreen");
switchtype.indicator("lime");
else
switchtype.indicator("red");
}
......@@ -1945,7 +1948,7 @@ function moon_status_cb(switches)
if (switchset == true) {
if (switch_array[i].split('=')[1].charAt(0) == '1')
switchtype.indicator("lightgreen");
switchtype.indicator("lime");
else
switchtype.indicator("red");
}
......@@ -2006,7 +2009,7 @@ var manual_medium = 0.0003;
var manual_fast = 0.001;
var manual_speed = manual_slow;
var manual_color_selected = 'lightgreen';
var manual_color_selected = 'lime';
var manual_color_off = 'grey';
var manual_button_slow = new dt_button_indicator("manual_speed_slow");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment