Font family is now language dependant

This commit is contained in:
Loïc Chapeaux
2001-07-07 15:13:58 +00:00
parent 02df5c20c0
commit 0bae68a09d
3 changed files with 31 additions and 48 deletions

View File

@@ -22,25 +22,18 @@ header('Content-Type: text/html; charset=' . $charset);
<title>phpMyAdmin</title> <title>phpMyAdmin</title>
<style type="text/css"> <style type="text/css">
<!-- <!--
<?php body {font-family: <?php echo $right_font_family; ?>; font-size: 10pt}
// Hard coded font name and size depends on charset. This is a temporary and th {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>}
// uggly fix td {font-family: <?php echo $right_font_family; ?>; font-size: 10pt;}
$font_family = ($charset == 'iso-8859-1') form {font-family: <?php echo $right_font_family; ?>; font-size: 10pt}
? 'helvetica, arial, geneva, sans-serif' h1 {font-family: <?php echo $right_font_family; ?>; font-size: 16pt; font-weight: bold}
: 'sans-serif'; A:link {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; text-decoration: none; color: #0000ff}
?> A:visited {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; text-decoration: none; color: #0000ff}
body {font-family: <?php echo $font_family; ?>; font-size: 10pt} A:hover {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; text-decoration: underline; color: #FF0000}
th {font-family: <?php echo $font_family; ?>; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>;} A:link.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
td {font-family: <?php echo $font_family; ?>; font-size: 10pt;} A:visited.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
form {font-family: <?php echo $font_family; ?>; font-size: 10pt} A:hover.nav {font-family: <?php echo $right_font_family; ?>; color: #FF0000}
h1 {font-family: <?php echo $font_family; ?>; font-size: 16pt; font-weight: bold} .nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
A:link {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: none; color: blue}
A:visited {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: none; color: blue}
A:hover {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: underline; color: red}
A:link.nav {font-family: <?php echo $font_family; ?>; color: #000000}
A:visited.nav {font-family: <?php echo $font_family; ?>; color: #000000}
A:hover.nav {font-family: <?php echo $font_family; ?>; color: red;}
.nav {font-family: <?php echo $font_family; ?>; color: #000000}
//--> //-->
</style> </style>
</head> </head>

24
left.js
View File

@@ -218,28 +218,28 @@ if (capable) {
if (isDOM) { if (isDOM) {
var lstyle = '<style type="text/css">' var lstyle = '<style type="text/css">'
+ 'div {color: #000000;}' + 'div {color: #000000;}'
+ '.heada {font: 12px\/13px; Times}' + '.heada {font-family: ' + fontFamily + '; font-size: 10pt}'
+ '.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration:none; display: block}' + '.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration:none; display: block}'
+ '.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration:none; display: none}' + '.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration:none; display: none}'
+ '.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}' + '.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}'
+ '.tblItem:hover {color: #FF0000; text-decoration: underline;}' + '.tblItem:hover {color: #FF0000; text-decoration: underline}'
+ '<\/style>'; + '<\/style>';
write(lstyle); write(lstyle);
} }
else { else {
write('<style type="text/css">'); write('<style type="text/css">');
write('div {color: #000000; }'); write('div {color: #000000; }');
write('.heada {font: 12px\/13px; Times}'); write('.heada {font-family: ' + fontFamily + '; font-size: 10pt}');
if (isIE4) { if (isIE4) {
write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; display: block}'); write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; display: block}');
write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration: none; display: none}'); write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration: none; display: none}');
write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}'); write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt}');
write('.tblItem:hover {color: #FF0000; text-decoration: underline;}'); write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
} }
else { else {
write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; position: absolute; visibility: hidden;}'); write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; position: absolute; visibility: hidden}');
write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; position: absolute; visibility: hidden}'); write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; position: absolute; visibility: hidden}');
write('.item, .tblItem {color: #333399; text-decoration: none;}'); write('.item, .tblItem {color: #333399; text-decoration: none}');
} }
write('<\/style>'); write('<\/style>');
} }
@@ -249,11 +249,11 @@ else {
with (document) { with (document) {
write('<style type="text/css">'); write('<style type="text/css">');
write('div {color: #000000; }'); write('div {color: #000000; }');
write('.heada {font: 12px\/13px; Times}'); write('.heada {font-family: ' + fontFamily + '; font-size: 10pt}');
write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none;}'); write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none}');
write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration: none;}'); write('.child {font-family: ' + fontFamily + '; font-size: 8pt; color: #333399; text-decoration: none}');
write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none;}'); write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none}');
write('.tblItem:hover {color: #FF0000; text-decoration: underline;}'); write('.tblItem:hover {color: #FF0000; text-decoration: underline}');
write('<\/style>'); write('<\/style>');
} }
} // end of adding styles } // end of adding styles

View File

@@ -30,9 +30,6 @@ header('Content-Type: text/html; charset=' . $charset);
/** /**
* Displays the frame * Displays the frame
*/ */
$font_family = ($charset == 'iso-8859-1')
? 'verdana, helvetica, arial, geneva, sans-serif'
: 'sans-serif';
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html> <html>
@@ -54,7 +51,7 @@ $font_family = ($charset == 'iso-8859-1')
capable = 0; capable = 0;
} }
} }
var fontFamily = '<?php echo $font_family; ?>'; var fontFamily = '<?php echo $left_font_family; ?>';
//--> //-->
</script> </script>
<script src="left.js" type="text/javascript" language="javascript1.2"></script> <script src="left.js" type="text/javascript" language="javascript1.2"></script>
@@ -62,24 +59,17 @@ $font_family = ($charset == 'iso-8859-1')
<style type="text/css"> <style type="text/css">
<!-- <!--
div {color: #000000;} div {color: #000000;}
.heada {font: 12px/13px; Times} .heada {font-family: ' + fontFamily + '; font-size: 10pt}
.parent {font-family: <?php echo $font_family; ?>; color: #000000; text-decoration: none;} .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none}
.child {font-family: <?php echo $font_family; ?>; font-size: 8pt; color: #333399; text-decoration: none;} .child {font-family: <?php echo $left_font_family; ?>; font-size: 8pt; color: #333399; text-decoration: none}
.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none;} .item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none}
.tblItem:hover {color: #FF0000; text-decoration: underline;} .tblItem:hover {color: #FF0000; text-decoration: underline}
//--> //-->
</style> </style>
</noscript> </noscript>
<style type="text/css"> <style type="text/css">
<!-- <!--
<?php body {font-family: <?php echo $left_font_family; ?>; font-size: 10pt}
// Hard coded font name and size depends on charset. This is a temporary and
// uggly fix
$font_family = ($charset == 'iso-8859-1')
? 'helvetica, arial, geneva, sans-serif'
: 'sans-serif';
?>
body {font-family: <?php echo $font_family; ?>; font-size: 10pt}
//--> //-->
</style> </style>
</head> </head>