RTL text direction support

This commit is contained in:
Jakub Vrana 2010-11-11 10:12:26 +01:00
parent 5bfeeef402
commit 540de0b7c9
5 changed files with 11 additions and 3 deletions

View file

@ -14,7 +14,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
$protocol = ($HTTPS ? "https" : "http");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="<?php echo $LANG; ?>">
<html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
@ -25,7 +25,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php } ?>
<body onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
<body class="<?php echo lang('ltr'); ?>" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
<script type="text/javascript" src="../adminer/static/functions.js"></script>
<script type="text/javascript" src="static/editing.js"></script>

View file

@ -259,4 +259,5 @@ $translations = array(
'Attachments' => 'ملفات مرفقة.',
'Item%s has been inserted.' => 'تم إدراج العنصر.',
'now' => 'الآن',
'ltr' => 'rtl',
);

View file

@ -47,6 +47,12 @@ pre { margin: 1em 0 0; }
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
#schema .references { position: absolute; }
.rtl h2 { margin: 0 -18px 20px 0; }
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
.rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
.rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; }
.rtl #lang, .rtl #menu { left: auto; right: 0; }
@media print {
#lang, #menu { display: none; }
#content { margin-left: 1em; }

View file

@ -1,5 +1,5 @@
// to hide elements displayed by JavaScript
document.body.className = 'js';
document.body.className += ' js';
/** Toggle visibility
* @param string

View file

@ -12,6 +12,7 @@ Support for virtual foreign keys
Disable XSS "protection" of IE8
Immunity against zend.ze1_compatibility_mode (bug #3089645)
Fix last page with empty result set
Arabic translation and RTL support
Dual licensing: Apache or GPL
Adminer 3.0.1 (released 2010-10-18):