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>
<style type="text/css">
<!--
<?php
// 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}
th {font-family: <?php echo $font_family; ?>; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>;}
td {font-family: <?php echo $font_family; ?>; font-size: 10pt;}
form {font-family: <?php echo $font_family; ?>; font-size: 10pt}
h1 {font-family: <?php echo $font_family; ?>; font-size: 16pt; font-weight: bold}
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}
body {font-family: <?php echo $right_font_family; ?>; font-size: 10pt}
th {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>}
td {font-family: <?php echo $right_font_family; ?>; font-size: 10pt;}
form {font-family: <?php echo $right_font_family; ?>; font-size: 10pt}
h1 {font-family: <?php echo $right_font_family; ?>; font-size: 16pt; font-weight: bold}
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}
A:hover {font-family: <?php echo $right_font_family; ?>; font-size: 10pt; text-decoration: underline; color: #FF0000}
A:link.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
A:visited.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
A:hover.nav {font-family: <?php echo $right_font_family; ?>; color: #FF0000}
.nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
//-->
</style>
</head>

24
left.js
View File

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

View File

@@ -30,9 +30,6 @@ header('Content-Type: text/html; charset=' . $charset);
/**
* 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">
<html>
@@ -54,7 +51,7 @@ $font_family = ($charset == 'iso-8859-1')
capable = 0;
}
}
var fontFamily = '<?php echo $font_family; ?>';
var fontFamily = '<?php echo $left_font_family; ?>';
//-->
</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">
<!--
div {color: #000000;}
.heada {font: 12px/13px; Times}
.parent {font-family: <?php echo $font_family; ?>; color: #000000; text-decoration: none;}
.child {font-family: <?php echo $font_family; ?>; font-size: 8pt; 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;}
.heada {font-family: ' + fontFamily + '; font-size: 10pt}
.parent {font-family: <?php echo $left_font_family; ?>; color: #000000; 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}
.tblItem:hover {color: #FF0000; text-decoration: underline}
//-->
</style>
</noscript>
<style type="text/css">
<!--
<?php
// 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}
body {font-family: <?php echo $left_font_family; ?>; font-size: 10pt}
//-->
</style>
</head>