diff -urpN --exclude-from ../..//misc/ignorelist drupal/includes/common.inc drupal-rtl/includes/common.inc --- drupal/includes/common.inc 2007-05-21 20:35:01.000000000 +0300 +++ drupal-rtl/includes/common.inc 2007-05-16 15:15:10.000000000 +0300 @@ -1449,6 +1449,10 @@ function drupal_add_link($attributes) { * @param $path * (optional) The path to the CSS file relative to the base_path(), e.g., * /modules/devel/devel.css. + * If the current language is an RTL language (Hebrew, Arabic...), the + * function will look for an RTL version of the CSS file in question. + * This file should be have a '-rtl' suffix to its name, e.g., a CSS file + * called 'name.css' will become 'name-rtl.css'. * @param $type * (optional) The type of stylesheet that is being added. Types are: module * or theme. @@ -1482,6 +1486,7 @@ function drupal_add_link($attributes) { */ function drupal_add_css($path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE) { static $css = array(); + global $language; // Create an array of CSS files for each media type first, since each type needs to be served // to the browser differently. @@ -1490,6 +1495,14 @@ function drupal_add_css($path = NULL, $t if (!isset($css[$media])) { $css[$media] = array('module' => array(), 'theme' => array()); } + // If the current language is RTL, return the RTLized version of CSS (instaed of 'name.css', return 'name-rtl.css') + if ($language->direction == LANGUAGE_RTL){ + // Check if a RTL version exist, and if it does, replace $path + $rtl_path = str_replace(".css","-rtl.css",$path); + if (file_exists($rtl_path)) { + $path = $rtl_path; + } + } $css[$media][$type][$path] = $preprocess; } Files drupal/misc/menu-collapsed-rtl.png and drupal-rtl/misc/menu-collapsed-rtl.png differ diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/aggregator/aggregator-rtl.css drupal-rtl/modules/aggregator/aggregator-rtl.css --- drupal/modules/aggregator/aggregator-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/aggregator/aggregator-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,38 @@ +/* $Id: aggregator.css,v 1.1 2006/08/14 07:14:48 drumm Exp $ */ + +#aggregator .feed-source .feed-title { + margin-top: 0; +} +#aggregator .feed-source .feed-image img { + margin-bottom: 0.75em; +} +#aggregator .feed-source .feed-icon { + float: left; + display: block; +} +#aggregator .feed-item { + margin-bottom: 1.5em; +} +#aggregator .feed-item-title { + margin-bottom: 0; + font-size: 1.3em; +} +#aggregator .feed-item-meta, #aggregator .feed-item-body { + margin-bottom: 0.5em; +} +#aggregator .feed-item-categories { + font-size: 0.9em; +} +#aggregator td { + vertical-align: bottom; +} +#aggregator td.categorize-item { + white-space: nowrap; +} +#aggregator .categorize-item .news-item .body { + margin-top: 0; +} +#aggregator .categorize-item h3 { + margin-bottom: 1em; + margin-top: 0; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/block/block-rtl.css drupal-rtl/modules/block/block-rtl.css --- drupal/modules/block/block-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/block/block-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,14 @@ +/* $Id: block.css,v 1.2 2006/12/07 19:50:31 unconed Exp $ */ + +#blocks td.region { + font-weight: bold; +} +#blocks td.block { + padding-right: 1.5em; +} +.block-region { + background-color: #ff6; + margin-top: 4px; + margin-bottom: 4px; + padding: 3px; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/book/book-rtl.css drupal-rtl/modules/book/book-rtl.css --- drupal/modules/book/book-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/book/book-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,30 @@ +/* $Id: book.css,v 1.2 2006/11/14 06:30:10 drumm Exp $ */ + +.book-navigation .menu { + border-top: 1px solid #888; + padding: 1em 0 0 3em; +} +.book-navigation .page-links { + border-top: 1px solid #888; + border-bottom: 1px solid #888; + text-align: center; + padding: 0.5em; +} +.book-navigation .page-previous { + text-align: left; + width: 42%; + display: block; + float: right; +} +.book-navigation .page-up { + margin: 0 5%; + width: 4%; + display: block; + float: right; +} +.book-navigation .page-next { + text-align: right; + width: 42%; + display: block; + float: right; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/comment/comment-rtl.css drupal-rtl/modules/comment/comment-rtl.css --- drupal/modules/comment/comment-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/comment/comment-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,3 @@ +.indented { + margin-right: 25px; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/forum/forum-rtl.css drupal-rtl/modules/forum/forum-rtl.css --- drupal/modules/forum/forum-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/forum/forum-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,29 @@ +/* $Id: forum.css,v 1.2 2006/11/14 06:30:10 drumm Exp $ */ + +#forum .description { + font-size: 0.9em; + margin: 0.5em; +} +#forum td.created, #forum td.posts, #forum td.topics, #forum td.last-reply, #forum td.replies, #forum td.pager { + white-space: nowrap; +} +#forum td.posts, #forum td.topics, #forum td.replies, #forum td.pager { + text-align: center; +} +.forum-topic-navigation { + padding: 1em 3em 0 0; + border-top: 1px solid #888; + border-bottom: 1px solid #888; + text-align: center; + padding: 0.5em; +} +.forum-topic-navigation .topic-previous { + text-align: left; + float: right; + width: 46%; +} +.forum-topic-navigation .topic-next { + text-align: right; + float: left; + width: 46%; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/help/help-rtl.css drupal-rtl/modules/help/help-rtl.css --- drupal/modules/help/help-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/help/help-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,10 @@ +/* $Id: help.css,v 1.1 2006/08/14 07:14:49 drumm Exp $ */ + +.help-items { + float: right; + width: 22%; + padding-left: 3%; +} +.help-items-last { + padding-left: 0; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/node/node-rtl.css drupal-rtl/modules/node/node-rtl.css --- drupal/modules/node/node-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/node/node-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,41 @@ +/* $Id: node.css,v 1.2 2006/09/05 03:50:56 unconed Exp $ */ + +.node-unpublished, .comment-unpublished { + background-color: #fff4f4; +} +.preview .node, .preview .comment { + background-color: #ffffea; +} +#node-admin-filter ul { + list-style-type: none; + padding: 0; + margin: 0; + width: 100%; +} +#node-admin-buttons { + float: right; + margin-right: 0.5em; + clear: left; +} +td.revision-current { + background: #ffc; +} +.node-form .form-text { + display: block; + width: 95%; +} +.node-form .container-inline .form-text { + display: inline; + width: auto; +} +.node-form .standard { + clear: both; +} +.node-form textarea { + display: block; + width: 95%; +} +.node-form .attachments fieldset { + float: none; + display: block; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/search/search-rtl.css drupal-rtl/modules/search/search-rtl.css --- drupal/modules/search/search-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/search/search-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,35 @@ +/* $Id: search.css,v 1.1 2006/08/14 07:14:49 drumm Exp $ */ + +.search-form { + margin-bottom: 1em; +} +.search-form p { + margin-top: 0; + margin-bottom: 0.2em; + padding-top: 0; + padding-bottom: 0; +} +.search-form input { + margin-top: 0; + margin-bottom: 0; +} +.search-results p { + margin-top: 0; +} +.search-results dt { + font-size: 1.1em; +} +.search-results dd { + margin-bottom: 1em; +} +.search-results .search-info { + font-size: 0.85em; +} +.search-advanced .criterion { + float: right; + margin-left: 2em; +} +.search-advanced .action { + float: right; + clear: right; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/system/defaults-rtl.css drupal-rtl/modules/system/defaults-rtl.css --- drupal/modules/system/defaults-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/system/defaults-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,53 @@ +/* $Id: defaults.css,v 1.2 2006/08/25 09:01:12 drumm Exp $ */ + +/* +** HTML elements +*/ +fieldset { + margin-bottom: 1em; + padding: .5em; +} +form { + margin: 0; + padding: 0; +} +hr { + height: 1px; + border: 1px solid gray; +} +img { + border: 0; +} +table { + border-collapse: collapse; +} +th { + text-align: right; + padding-left: 1em; + border-bottom: 3px solid #ccc; +} + +/* +** Markup free clearing +** Details: http://www.positioniseverything.net/easyclearing.html +*/ +.clear-block:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.clear-block { + display: inline-block; +} + +/* Hides from IE-mac \*/ +* html .clear-block { + height: 1%; +} +.clear-block { + display: block; +} +/* End hide from IE-mac */ diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/system/system-rtl.css drupal-rtl/modules/system/system-rtl.css --- drupal/modules/system/system-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/system/system-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,393 @@ +/* $Id: system.css,v 1.21 2006/12/21 16:13:06 dries Exp $ */ + +/* +** HTML elements +*/ +th.active img { + display: inline; +} +tr.even, tr.odd { + background-color: #eee; + border-bottom: 1px solid #ccc; + padding: 0.1em 0.6em; +} +td.active { + background-color: #ddd; +} +tbody { + border-top: 1px solid #ccc; +} +tbody th { + border-bottom: 1px solid #ccc; +} +thead th { + text-align: right; + padding-left: 1em; + border-bottom: 3px solid #ccc; +} + +/* +** Other common styles +*/ +.breadcrumb { + padding-bottom: .5em +} +.error { + color: #f00; +} +div.error { + border: 1px solid #d77; +} +div.error, tr.error { + background: #fcc; + color: #200; +} +div.warning, tr.warning { + background: #ffd; +} +div.ok, tr.ok { + background: #dfd; +} +.item-list .icon { + color: #555; + float: left; + padding-right: 0.25em; + clear: left; +} +.item-list .title { + font-weight: bold; +} +.item-list ul { + margin: 0 0 0.75em 0; + padding: 0; +} +.item-list ul li { + margin: 0 1.5em 0.25em 0; + padding: 0; + list-style: disc; +} +.form-item { + margin-top: 1em; + margin-bottom: 1em; +} +tr.odd .form-item, tr.even .form-item { + margin-top: 0; + margin-bottom: 0; + white-space: nowrap; +} +tr.merge-down, tr.merge-down td, tr.merge-down th { + border-bottom-width: 0 !important; +} +tr.merge-up, tr.merge-up td, tr.merge-up th { + border-top-width: 0 !important; +} +.form-item input.error, .form-item textarea.error, .form-item select.error { + border: 2px solid red; +} +.form-item .description { + font-size: 0.85em; +} +.form-item label { + display: block; + font-weight: bold; +} +.form-item label.option { + display: inline; + font-weight: normal; +} +.form-checkboxes, .form-radios { + margin: 1em 0; +} +.form-checkboxes .form-item, .form-radios .form-item { + margin-top: 0.4em; + margin-bottom: 0.4em; +} +.marker, .form-required { + color: #f00; +} +.more-link { + text-align: left; +} +.more-help-link { + font-size: 0.85em; + text-align: left; +} +.nowrap { + white-space: nowrap; +} +.pager { + clear: both; + text-align: center; +} +.pager a, .pager strong.pager-current { + padding: 0.5em; +} +.tips { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; + font-size: 0.9em; +} +dl.multiselect dd.b, dl.multiselect dd.b .form-item, dl.multiselect dd.b select { + font-family: inherit; + font-size: inherit; + width: 14em; +} +dl.multiselect dd.a, dl.multiselect dd.a .form-item { + width: 8em; +} +dl.multiselect dt, dl.multiselect dd { + float: right; + line-height: 1.75em; + padding: 0; + margin: 0 0 0 1em; +} +dl.multiselect .form-item { + height: 1.75em; + margin: 0; +} + +/* +** Inline items (need to override above) +*/ +.container-inline div, .container-inline label { + display: inline; +} + +/* +** Menus +*/ +ul.menu { + list-style: none; + border: none; + text-align:right; +} +ul.menu li { + margin: 0 0.5em 0 0; +} +li.expanded { + list-style-type: circle; + list-style-image: url(../../misc/menu-expanded.png); + padding: 0.2em 0 0 0.5em; + margin: 0; +} +li.collapsed { + list-style-type: disc; + list-style-image: url(../../misc/menu-collapsed-rtl.png); + padding: 0.2em 0 0 0.5em; + margin: 0; +} +li.leaf { + list-style-type: square; + list-style-image: url(../../misc/menu-leaf.png); + padding: 0.2em 0 0 0.5em; + margin: 0; +} +li a.active { + color: #000; +} +td.menu-disabled { + background: #ccc; +} +ul.links { + margin: 0; + padding: 0; +} +ul.links.inline { + display: inline; +} +ul.links li { + display: inline; + list-style-type: none; + padding: 0 0.5em; +} +.block ul { + margin: 0; + padding: 0 1em 0.25em 0; +} + +/* +** Tab navigation +*/ +ul.primary { + border-collapse: collapse; + padding: 0 1em 0 0; + white-space: nowrap; + list-style: none; + margin: 5px; + height: auto; + line-height: normal; + border-bottom: 1px solid #bbb; +} +ul.primary li { + display: inline; +} +ul.primary li a { + background-color: #ddd; + border-color: #bbb; + border-width: 1px; + border-style: solid solid none solid; + height: auto; + margin-left: 0.5em; + padding: 0 1em; + text-decoration: none; +} +ul.primary li.active a { + background-color: #fff; + border: 1px solid #bbb; + border-bottom: #fff 1px solid; +} +ul.primary li a:hover { + background-color: #eee; + border-color: #ccc; + border-bottom-color: #eee; +} +ul.secondary { + border-bottom: 1px solid #bbb; + padding: 0.5em 1em; + margin: 5px; +} +ul.secondary li { + display: inline; + padding: 0 1em; + border-left: 1px solid #ccc; +} +ul.secondary a { + padding: 0; + text-decoration: none; +} +ul.secondary a.active { + border-bottom: 4px solid #999; +} + +/* +** Autocomplete styles +*/ +/* Suggestion list */ +#autocomplete { + position: absolute; + border: 1px solid; + overflow: hidden; + z-index: 100; +} +#autocomplete ul { + margin: 0; + padding: 0; + list-style: none; +} +#autocomplete li { + background: #fff; + color: #000; + white-space: pre; + cursor: default; +} +#autocomplete li.selected { + background: #0072b9; + color: #fff; +} +/* Animated throbber */ +html.js input.form-autocomplete { + background-image: url(../../misc/throbber.gif); + background-repeat: no-repeat; + background-position: 0% 2px; +} +html.js input.throbbing { + background-position: 0% -18px; +} + +/* +** Collapsing fieldsets +*/ +html.js fieldset.collapsed { + border-bottom-width: 0; + border-right-width: 0; + border-left-width: 0; + margin-bottom: 0; + height: 1em; +} +html.js fieldset.collapsed * { + display: none; +} +html.js fieldset.collapsed legend { + display: block; +} +html.js fieldset.collapsible legend a { + padding-right: 15px; + /*background: url(../../misc/menu-expanded.png) 5px 75% no-repeat;*//* LTR version*/ + background: url(../../misc/menu-expanded.png) 98% 75% no-repeat; +} +html.js fieldset.collapsed legend a { + background-image: url(../../misc/menu-collapsed-rtl.png); + background-position: 98% 50%; +} +/* Note: IE-only fix due to '* html' (breaks Konqueror otherwise). */ +* html.js fieldset.collapsed legend, +* html.js fieldset.collapsed legend *, +* html.js fieldset.collapsed table * { + display: inline; +} +html.js fieldset.collapsible legend a { + display: block; +} +/* Avoid jumping around due to margins collapsing into collapsible fieldset border */ +html.js fieldset.collapsible .fieldset-wrapper { + overflow: auto; +} + +/* +** Resizable text areas +*/ +.resizable-textarea { + width: 95%; +} +.resizable-textarea .grippie { + height: 9px; + overflow: hidden; + background: #eee url(../../misc/grippie.png) no-repeat center 2px; + border: 1px solid #ddd; + border-top-width: 0; + cursor: s-resize; +} +html.js .resizable-textarea textarea { + margin-bottom: 0; + width: 100%; + display: block; +} + +/* +** Progressbar styles +*/ +.progress { + font-weight: bold; +} +.progress .bar { + background: #fff url(../../misc/progress.gif); + border: 1px solid #00375a; + height: 1.5em; + margin-top: 0.2em; +} +.progress .filled { + background: #0072b9; + height: 1em; + border-bottom: 0.5em solid #004a73; + width: 0%; +} +.progress .percentage { + float: left; +} + +/* +** Formatting for welcome page +*/ +#first-time strong { + display: block; + padding: 1.5em 0 .5em; +} + +/* +** To be used with tableselect.js +*/ +tr.selected td { + background: #ffc; +} diff -urpN --exclude-from ../..//misc/ignorelist drupal/modules/user/user-rtl.css drupal-rtl/modules/user/user-rtl.css --- drupal/modules/user/user-rtl.css 1970-01-01 02:00:00.000000000 +0200 +++ drupal-rtl/modules/user/user-rtl.css 2007-05-21 20:25:38.000000000 +0300 @@ -0,0 +1,49 @@ +/* $Id: user.css,v 1.4 2006/12/30 07:45:31 dries Exp $ */ + +#permissions td.module { + font-weight: bold; +} +#permissions td.permission { + padding-right: 1.5em; +} +#access-rules .access-type, #access-rules .rule-type { + margin-left: 1em; + float: right; +} +#access-rules .access-type .form-item, #access-rules .rule-type .form-item { + margin-top: 0; +} +#access-rules .mask { + clear: both; +} +#user-login-form { + text-align: center; +} +#user-admin-filter ul { + list-style-type: none; + padding: 0; + margin: 0; + width: 100%; +} +#user-admin-buttons { + float: right; + margin-right: 0.5em; + clear: left; +} + +/* Generated by user.module but used by profile.module: */ +.profile { + clear: both; + margin: 1em 0; +} +.profile .picture { + float: left; + margin: 0 0 1em 1em; +} +.profile dt { + margin: 1em 0 0.2em 0; + font-weight: bold; +} +.profile dd { + margin:0; +}