From a0c0e8aefbac3e3979bac5fbfdecfedfe49cc2d3 Mon Sep 17 00:00:00 2001 From: Colin Fleming Date: Wed, 16 Jan 2013 19:34:02 +0000 Subject: [PATCH] Tidy up HTML Colour Names With XHTML 1.0, the extended colour names are invalid, to make pfSense as W3C compliant as possible, need to go back to using the HEX code. --- usr/local/www/firewall_schedule_edit.php | 20 +++++++++---------- usr/local/www/includes/functions.inc.php | 14 ++++++------- usr/local/www/status_gateway_groups.php | 12 +++++------ usr/local/www/status_gateways.php | 14 ++++++------- usr/local/www/status_lb_pool.php | 10 +++++----- usr/local/www/status_lb_vs.php | 16 +++++++-------- .../www/widgets/widgets/gateways.widget.php | 14 ++++++------- .../widgets/load_balancer_status.widget.php | 16 +++++++-------- 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php index 8e81d1bdc8..a9d0b672cb 100644 --- a/usr/local/www/firewall_schedule_edit.php +++ b/usr/local/www/firewall_schedule_edit.php @@ -234,7 +234,7 @@ function repeatExistingDays(){ tempstr = 'w' + week + 'p' + daypos; daycell = eval('document.getElementById(tempstr)'); if (daydone == "-1"){ - if (daycell.style.backgroundColor == "lightcoral") + if (daycell.style.backgroundColor == "#F08080") // lightcoral daytogglerepeating(week,daypos,true); else daytogglerepeating(week,daypos,false); @@ -257,11 +257,11 @@ function daytogglerepeating(week,daypos,bExists){ if (daycell != null) { if (bExists){ - daycell.style.backgroundColor = "WHITE"; + daycell.style.backgroundColor = "#FFFFFF"; // white } else { - daycell.style.backgroundColor = "lightcoral"; + daycell.style.backgroundColor = "#F08080"; // lightcoral } if (dayoriginalpos != "-1") @@ -302,12 +302,12 @@ function daytoggle(id) { var daycell = document.getElementById(idmod); if (daycell != null){ - if (daycell.style.backgroundColor == "RED"){ - daycell.style.backgroundColor = "WHITE"; + if (daycell.style.backgroundColor == "#FF0000"){ // red + daycell.style.backgroundColor = "#FFFFFF"; // white str = id + ","; daysSelected = daysSelected.replace(str, ""); } - else if (daycell.style.backgroundColor == "lightcoral") + else if (daycell.style.backgroundColor == "#F08080") // lightcoral { daytogglerepeating(week,daypos,true); } @@ -315,11 +315,11 @@ function daytoggle(id) { { if (!runrepeat) { - daycell.style.backgroundColor = "RED"; + daycell.style.backgroundColor = "#FF0000"; // red } else { - daycell.style.backgroundColor = "lightcoral"; + daycell.style.backgroundColor = "#F08080"; // lightcoral daytogglerepeating(week,daypos,false); } daysSelected += id + ","; @@ -654,7 +654,7 @@ function clearCalendar(){ tempstr = 'w' + j + 'p' + k; daycell = eval('document.getElementById(tempstr)'); if (daycell != null){ - daycell.style.backgroundColor = "WHITE"; + daycell.style.backgroundColor = "#FFFFFF"; // white } } } @@ -1164,4 +1164,4 @@ EOD; - + \ No newline at end of file diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index b6afbff51f..b209641e97 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -42,19 +42,19 @@ function get_gatewaystats() { switch(strtolower($gws['status'])) { case "none": $online = "Online"; - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen break; case "down": $online = "Offline"; - $bgcolor = "lightcoral"; + $bgcolor = "#F08080"; // lightcoral break; case "delay": $online = "Latency"; - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki break; case "loss": $online = "Packetloss"; - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki break; default: $online = "Pending"; @@ -65,10 +65,10 @@ function get_gatewaystats() { $gws['delay'] = "~"; $gws['loss'] = "~"; $online = "Unknown"; - $bgcolor = "lightblue"; + $bgcolor = "#ADD8E6"; // lightblue } $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; - $data .= "
$online
"; + $data .= "
 $online 
"; } return $data; } @@ -312,4 +312,4 @@ function get_interfacestatus() { return $data; } -?> +?> \ No newline at end of file diff --git a/usr/local/www/status_gateway_groups.php b/usr/local/www/status_gateway_groups.php index 6365ef397d..a270f6145b 100755 --- a/usr/local/www/status_gateway_groups.php +++ b/usr/local/www/status_gateway_groups.php @@ -122,21 +122,21 @@ include("head.inc"); $status = $gateways_status[$monitor]['status']; if (stristr($status, "down")) { $online = gettext("Offline"); - $bgcolor = "lightcoral"; + $bgcolor = "#F08080"; // lightcoral } elseif (stristr($status, "loss")) { $online = gettext("Warning, Packetloss"); - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki } elseif (stristr($status, "delay")) { $online = gettext("Warning, Latency"); - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki } elseif ($status == "none") { $online = gettext("Online"); - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen } else { $online = gettext("Gathering data"); - $bgcolor = "lightblue"; + $bgcolor = "#ADD8E6"; // lightblue } - echo "". htmlspecialchars($member) .", $online"; + echo " ". htmlspecialchars($member) .", $online "; } else { echo " "; } diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index 0219c954eb..e7154a8c18 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -117,25 +117,25 @@ include("head.inc"); $status = $gateways_status[$gname]; if (stristr($status['status'], "down")) { $online = gettext("Offline"); - $bgcolor = "lightcoral"; + $bgcolor = "#F08080"; // lightcoral } elseif (stristr($status['status'], "loss")) { $online = gettext("Warning, Packetloss").': '.$status['loss']; - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki } elseif (stristr($status['status'], "delay")) { $online = gettext("Warning, Latency").': '.$status['delay']; - $bgcolor = "khaki"; + $bgcolor = "#F0E68C"; // khaki } elseif ($status['status'] == "none") { $online = gettext("Online"); - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen } } else if (isset($gateway['monitor_disable'])) { $online = gettext("Online"); - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen } else { $online = gettext("Pending"); - $bgcolor = "lightgray"; + $bgcolor = "#D3D3D3"; // lightgray } - echo ""; - echo ""; + echo " "; } } }
$online
"; + echo "
"; @@ -194,11 +194,11 @@ if ($_POST) { echo "\n"; break; } - echo ""; + echo " "; } } ?> diff --git a/usr/local/www/status_lb_vs.php b/usr/local/www/status_lb_vs.php index 0e3b9d8dcd..cb1ce0d7d3 100755 --- a/usr/local/www/status_lb_vs.php +++ b/usr/local/www/status_lb_vs.php @@ -105,16 +105,16 @@ include("head.inc"); \n"; + echo "\n"; $counter++; ?>
 $online 
"; $lastchange = $gateways_status[$gname]['lastcheck']; if(!empty($lastchange)) { echo gettext("Last check:") . '
' . $lastchange; diff --git a/usr/local/www/status_lb_pool.php b/usr/local/www/status_lb_pool.php index 83d21b4ed8..88ea0ab880 100755 --- a/usr/local/www/status_lb_pool.php +++ b/usr/local/www/status_lb_pool.php @@ -174,7 +174,7 @@ if ($_POST) { if($server['ip']['addr']!="") { switch ($server['ip']['state']) { case 'up': - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen $checked = "checked"; break; case 'disabled': @@ -182,7 +182,7 @@ if ($_POST) { $checked = ""; break; default: - $bgcolor = "lightcoral"; + $bgcolor = "#F08080"; // lightcoral $checked = "checked"; } echo "
{$server['ip']['addr']}:{$pool['port']} "; -# echo " {$server['ip']['addr']}:{$pool['port']} "; + echo " {$server['ip']['addr']}:{$pool['port']}  "; +# echo " {$server['ip']['addr']}:{$pool['port']} "; if($server['ip']['avail']) echo " ({$server['ip']['avail']}) "; - echo "
diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 0bc695ca08..6b185c738b 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -87,25 +87,25 @@ $counter = 1; $online
 $online 
diff --git a/usr/local/www/widgets/widgets/load_balancer_status.widget.php b/usr/local/www/widgets/widgets/load_balancer_status.widget.php index 63f8bc4ded..d63df929f5 100644 --- a/usr/local/www/widgets/widgets/load_balancer_status.widget.php +++ b/usr/local/www/widgets/widgets/load_balancer_status.widget.php @@ -73,15 +73,15 @@ if (!$nentries) @@ -113,22 +113,22 @@ if (!$nentries) if($server['ip']['addr']!="") { switch ($server['ip']['state']) { case 'up': - $bgcolor = "lightgreen"; + $bgcolor = "#90EE90"; // lightgreen $checked = "checked"; break; case 'disabled': - $bgcolor = "white"; + $bgcolor = "#FFFFFF"; // white $checked = ""; break; default: - $bgcolor = "lightcoral"; + $bgcolor = "#F08080"; // lightcoral $checked = "checked"; } echo "
{$server['ip']['addr']}:{$pool['port']} "; + echo " {$server['ip']['addr']}:{$pool['port']}  "; if($server['ip']['avail']) echo " ({$server['ip']['avail']}) "; - echo "