diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-08 21:32:03 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-08 21:32:03 -0700 |
commit | 1ecdb5ef0c82272d8019e4b7d834432f73baf474 (patch) | |
tree | 1d6d989b7928e5843624ce7ed8782c9b8aabb607 | |
parent | f0ca27ab924c06cc72a44d66498b86aeda672b33 (diff) | |
parent | b9ee6f7d185c734dcff595d06d9c6e6fda5822ac (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
-rw-r--r-- | modules/gallery/css/l10n_client.css | 12 | ||||
-rw-r--r-- | modules/gallery/helpers/locale.php | 6 | ||||
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 7 | ||||
-rw-r--r-- | modules/gallery/views/admin_block_log_entries.html.php | 2 | ||||
-rw-r--r-- | themes/admin_default/css/screen.css | 55 | ||||
-rw-r--r-- | themes/admin_default/views/admin.html.php | 2 | ||||
-rw-r--r-- | themes/default/css/screen.css | 77 | ||||
-rw-r--r-- | themes/default/views/page.html.php | 2 |
8 files changed, 152 insertions, 11 deletions
diff --git a/modules/gallery/css/l10n_client.css b/modules/gallery/css/l10n_client.css index 8e668072..bab1d0ed 100644 --- a/modules/gallery/css/l10n_client.css +++ b/modules/gallery/css/l10n_client.css @@ -71,7 +71,9 @@ how it wants to round. */ #l10n-client-string-select { display:none; float:left; - width:25%;} + width:25%; + direction: ltr; +} #l10n-client .string-list { height:17em; @@ -150,17 +152,19 @@ how it wants to round. */ float:left; width:74%;} - #l10n-client-string-editor .source { +#l10n-client-string-editor .source { overflow:hidden; width:50%; float:left;} - #l10n-client-string-editor .source .source-text { +#l10n-client-string-editor .source .source-text { line-height:1.5em; background:#eee; font-family: monospace; text-align: left; height:16em; margin:1em; padding:1em; - overflow:auto;} + overflow:auto; + direction: ltr; +} #l10n-client-string-editor .translation { overflow:hidden; diff --git a/modules/gallery/helpers/locale.php b/modules/gallery/helpers/locale.php index c176dcc6..9783a53a 100644 --- a/modules/gallery/helpers/locale.php +++ b/modules/gallery/helpers/locale.php @@ -114,7 +114,9 @@ class locale_Core { return self::$locales["$locale"]; } - static function is_rtl($locale) { - return in_array($locale, array("he_IL", "fa_IR", "ar_SA")); + static function is_rtl($locale=null) { + $locale or $locale = I18n::instance()->locale(); + list ($language, $territory) = explode('_', $locale . "_"); + return in_array($language, array("he", "fa", "ar")); } }
\ No newline at end of file diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index 836d1087..bd2794a0 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -43,4 +43,11 @@ class View extends View_Core { return ""; } } + + public function main_element_attributes() { + if (locale::is_rtl()) { + return 'class="rtl"'; + } + return ''; + } } diff --git a/modules/gallery/views/admin_block_log_entries.html.php b/modules/gallery/views/admin_block_log_entries.html.php index 5d8f3084..38070fe1 100644 --- a/modules/gallery/views/admin_block_log_entries.html.php +++ b/modules/gallery/views/admin_block_log_entries.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <ul> <? foreach ($entries as $entry): ?> - <li class="<?= log::severity_class($entry->severity) ?>"> + <li class="<?= log::severity_class($entry->severity) ?>" style="direction: ltr"> <a href="<?= url::site("user/$entry->user_id") ?>"><?= p::clean($entry->user->name) ?></a> <?= date("Y-M-d H:i:s", $entry->timestamp) ?> <?= $entry->message ?> diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 38fcf089..1ad64fa1 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -36,6 +36,12 @@ margin-right: 1em; } +.rtl .gSelected img, +.rtl .gAvailable .gBlock img { + float: right; + margin-left: 1em; +} + .gSelected { background: #e8e8e8; } @@ -95,6 +101,10 @@ margin: -22px 10px 0 0; } +.rtl #gHeader #gLogo { + float: left; +} + #gHeader #gLoginMenu { float: none; margin: 0; @@ -105,11 +115,20 @@ text-align: right; } + +.rtl #gHeader #gLoginMenu { + text-align: left; +} + #gHeader #gSiteAdminMenu { float: left; font-size: 1.2em; } +.rtl #gHeader #gSiteAdminMenu { + float: right; +} + #gHeader #gSiteAdminMenu ul { margin-bottom: 0; } @@ -147,6 +166,10 @@ width: 90px; } +.rtl #gContent #gPhotoStream .gItem { + float: right; +} + #gSiteStatus { margin-bottom: 0; } @@ -179,12 +202,23 @@ width: 30%; } +.rtl #gAdminGraphics .gAvailable .gBlock { + float: right; + margin-left: 1em; + margin-right: 0em; +} + #gSiteTheme, #gAdminTheme { float: left; width: 48%; } +.rtl #gSiteTheme, +.rtl #gAdminTheme { + float: right; +} + #gSiteTheme { margin-right: 1em; } @@ -218,6 +252,11 @@ li.gGroup { padding: 0; margin: 0 1em 1em 0; } + +.rtl li.gGroup { + float: right; +} + li.gGroup h4 { background-color: #EEEEEE; border-bottom: 1px dashed #CCCCCC; @@ -319,6 +358,9 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; width: 200px; } +.rtl #gTagAdmin .gColumn { + float: right; +} .gEditable { padding: .1em .3em .2em .3em; } @@ -332,6 +374,9 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; margin: 0 .2em 0 0; } +.rtl #gRenameTagForm input { + float: right; +} #gRenameTagForm input[type="submit"] { height: 25px; } @@ -340,10 +385,16 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { float: left; padding: .2em .2em 0 .1em; } +.rtl #gRenameTagForm a, #gRenameTagForm span { + float: right; +} #gProgress button { float: right; margin-top: 1em; } +.rtl #gProgress button { + float: left; +} /** ******************************************************************* * 7) Server Add @@ -353,6 +404,10 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser { text-align: left; } +.rtl #gServerAddAdmin { + text-align: right; +} + #gServerAddAdmin form fieldset { border: medium none; } diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index efb5f62c..721c4dd5 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -31,7 +31,7 @@ <?= $theme->admin_head() ?> </head> - <body> + <body <?= $theme->main_element_attributes() ?>> <?= $theme->admin_page_top() ?> <? if ($sidebar): ?> <div id="doc3" class="yui-t5 gView"> diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 71711147..f306f287 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -18,6 +18,10 @@ * 1) Basic HTML elements **********************************************************************/ +.rtl { + direction: rtl; +} + body, html { background-color: #ccc; font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; @@ -88,9 +92,12 @@ a:hover, margin: .3em 1em; } -#gForgotPasswordLink { +.rtl #gDialog .gCancel { float: right; - font-size: .9em; +} + +.rtl #gForgotPasswordLink { + float: left; } /* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -108,6 +115,11 @@ th { text-align: left; } +.rtl caption, +.rtl th { + text-align: right; +} + th { font-weight: bold; } @@ -193,6 +205,10 @@ form ul ul li { float: left; } +.rtl form ul ul li { + float: right; +} + input, select, textarea { @@ -208,6 +224,11 @@ input[type="reset"] { float: left; } +.rtl input[type="submit"], +.rtl input[type="reset"] { + float: right; +} + /* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ .gValidationRule { @@ -364,6 +385,10 @@ form .gError, padding: .4em 0; } +.rtl .gShortForm li { + float: right; +} + .gShortForm label { display: none; } @@ -428,12 +453,21 @@ form .gError, margin: -4px 10px 0 0; } +.rtl #gHeader #gLogo { + float: right; +} + #gHeader #gQuickSearchForm { clear: right; float: right; margin: 1em 0; } +.rtl #gHeader #gQuickSearchForm { + clear: left; + float: left; +} + #gHeader #gQuickSearchForm input[type='text'] { width: 17em; } @@ -474,6 +508,11 @@ form .gError, width: 213px; } + +.rtl #gContent #gAlbumGrid .gItem { + float: right; +} + #gContent #gAlbumGrid .gItem h2 { margin: 5px 0; } @@ -579,6 +618,10 @@ form .gError, float: right; } +.rtl #gHeader #gLoginMenu { + float: left; +} + /* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #gSiteMenu { @@ -587,6 +630,10 @@ form .gError, padding: 0 20px 0 0; } +.rtl #gSiteMenu { + float: right; +} + #gSiteMenu ul { margin-bottom: 0; } @@ -634,6 +681,10 @@ form .gError, padding: 10px 6px 10px 16px !important; } +.rtl .gBreadcrumbs li { + float: right; +} + .gBreadcrumbs li.root { background: transparent; } @@ -734,6 +785,10 @@ form .gError, width: 30%; } +.rtl .gPager li { + float: right; +} + .gPager .gInfo { text-align: center; width: 40%; @@ -802,6 +857,12 @@ form .gError, text-align: left; } +.rtl #gDialog { + font-family: inherit; + font-size: inherit; + text-align: right; +} + #gDialog li { padding-left: 0; } @@ -843,6 +904,10 @@ form .gError, float: left; } +.rtl .gButtonSet li { + float: right; +} + .gButtonSet .gButtonLink { margin: 0; } @@ -852,11 +917,19 @@ form .gError, margin-right: .2em; } +.rtl .ui-icon-left .ui-icon { + float: right; +} + .ui-icon-right .ui-icon { float: right; margin-left: .2em; } +.rtl .ui-icon-right .ui-icon { + float: left; +} + .ui-icon-rotate-ccw { background-position: -192px -64px; } diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 5e7101e1..6c77fb72 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -54,7 +54,7 @@ <?= $theme->head() ?> </head> - <body> + <body <?= $theme->main_element_attributes() ?>> <?= $theme->page_top() ?> <div id="doc4" class="yui-t5 gView"> <?= $theme->site_status() ?> |