Permalink
Browse files

MDL-32479 - RTL Theme fixes for Moodle 2 (theme/base)

Support for blocks columns switch when in rtl mode:
theme/base/layout/frontpage.php
theme/base/layout/general.php

Right align course completion checkbox to the right side of the activities and resources, when in RTL mode
theme/base/style/course.css

Right align DOCK bar, when in RTL mode
theme/base/style/dock.css

First-name and Last-name Initials (filter) bar (on every users list) letters spacing (usability issue, NOT RTL issue)
theme/base/style/core.css

Conflicts:

	theme/base/style/core.css
	theme/base/style/course.css
  • Loading branch information...
nadavkav authored and nebgor committed Apr 17, 2012
1 parent cafc5ae commit d180d19a830c49b2c57460c011a4a737b1ace563
@@ -10,9 +10,17 @@
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
- $bodyclasses[] = 'side-pre-only';
+ if (!right_to_left()) {
+ $bodyclasses[] = 'side-pre-only';
+ }else{
+ $bodyclasses[] = 'side-post-only';
+ }
} else if ($showsidepost && !$showsidepre) {
- $bodyclasses[] = 'side-post-only';
+ if (!right_to_left()) {
+ $bodyclasses[] = 'side-post-only';
+ }else{
+ $bodyclasses[] = 'side-pre-only';
+ }
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
@@ -58,18 +66,29 @@
</div>
</div>
- <?php if ($hassidepre) { ?>
+ <?php if ($hassidepre OR (right_to_left() AND $hassidepost)) { ?>
<div id="region-pre" class="block-region">
<div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ <?php
+ if (!right_to_left()) {
+ echo $OUTPUT->blocks_for_region('side-pre');
+ } elseif ($hassidepost) {
+ echo $OUTPUT->blocks_for_region('side-post');
+ } ?>
+
</div>
</div>
<?php } ?>
- <?php if ($hassidepost) { ?>
+ <?php if ($hassidepost OR (right_to_left() AND $hassidepre)) { ?>
<div id="region-post" class="block-region">
<div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ <?php
+ if (!right_to_left()) {
+ echo $OUTPUT->blocks_for_region('side-post');
+ } elseif ($hassidepre) {
+ echo $OUTPUT->blocks_for_region('side-pre');
+ } ?>
</div>
</div>
<?php } ?>
@@ -15,9 +15,17 @@
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
- $bodyclasses[] = 'side-pre-only';
+ if (!right_to_left()) {
+ $bodyclasses[] = 'side-pre-only';
+ }else{
+ $bodyclasses[] = 'side-post-only';
+ }
} else if ($showsidepost && !$showsidepre) {
- $bodyclasses[] = 'side-post-only';
+ if (!right_to_left()) {
+ $bodyclasses[] = 'side-post-only';
+ }else{
+ $bodyclasses[] = 'side-pre-only';
+ }
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
@@ -73,21 +81,33 @@
</div>
</div>
- <?php if ($hassidepre) { ?>
+ <?php if ($hassidepre OR (right_to_left() AND $hassidepost)) { ?>
<div id="region-pre" class="block-region">
<div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ <?php
+ if (!right_to_left()) {
+ echo $OUTPUT->blocks_for_region('side-pre');
+ } elseif ($hassidepost) {
+ echo $OUTPUT->blocks_for_region('side-post');
+ } ?>
+
</div>
</div>
<?php } ?>
- <?php if ($hassidepost) { ?>
+ <?php if ($hassidepost OR (right_to_left() AND $hassidepre)) { ?>
<div id="region-post" class="block-region">
<div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ <?php
+ if (!right_to_left()) {
+ echo $OUTPUT->blocks_for_region('side-post');
+ } elseif ($hassidepre) {
+ echo $OUTPUT->blocks_for_region('side-pre');
+ } ?>
</div>
</div>
<?php } ?>
+
</div>
</div>
</div>
@@ -805,6 +805,7 @@ sup {vertical-align: super;}
#page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {direction: ltr;text-align: left;}
#page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {margin-right: 170px;}
+<<<<<<< HEAD
/**
* Chooser Dialogue
@@ -961,3 +962,4 @@ sup {vertical-align: super;}
-moz-box-shadow: 0px 0px 10px 0px #CCCCCC;
}
+.initialbar a {padding-right: 2px;}
@@ -41,7 +41,8 @@
.path-course-view li.activity form.togglecompletion .ajaxworking {position:absolute;top:0; left:20px;width: 20px; height: 20px;background: url([[pix:i/ajaxloader]]) no-repeat;}
.dir-rtl.path-course-view li.activity {margin-right:0px;margin-left:20px;}
.dir-rtl.path-course-view li.activity form.togglecompletion,
-.dir-rtl.path-course-view li.activity span.autocompletion {right:auto;left:-20px;}
+.dir-rtl.path-course-view li.activity span.autocompletion {right:-20px;left:auto;padding:0px;}
+.dir-rtl.path-course-view .completionprogress {float: none;}
.section img.movetarget {height:16px;width:80px;}
@@ -164,3 +165,5 @@ input.titleeditor {
.dndupload-progress-outer {width:70px;border:solid black 1px;height:10px;display:inline-block;margin:0;padding:0;overflow:hidden;position:relative;}
.dndupload-progress-inner {width:0%;height:100%;background-color:green;display:inline-block;margin:0;padding:0;float:left;}
.dndupload-hidden {display:none;}
+
+.dir-rtl.path-course-view li.activity form.togglecompletion, .dir-rtl.path-course-view li.activity span.autocompletion
@@ -32,4 +32,11 @@ body.has_dock {margin-left:30px;}
.ie6 #dockeditempanel {position:absolute;}
/** Overide for RTL layout **/
-.dir-rtl #dockeditempanel {left:670%;}
+.dir-rtl #dockeditempanel {left:670%;}
+
+/* right align the DOCK panel
+------------------------------*/
+.dir-rtl #dockeditempanel {right: 100%;}
+.dir-rtl #dock {left:auto;right: 0%; border-left: 1px solid #DDD;}
+.dir-rtl #dock .dockedtitle { border-bottom: 1px solid #DDD;border-top: 1px solid #EEE; cursor: pointer;}
+body.dir-rtl.has_dock {margin-left: 0px; margin-right: 30px}

0 comments on commit d180d19

Please sign in to comment.