mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Revert "MDL-39871 Find a solution to handling RTL switching in CSS"
This reverts commit2e68b1254f
. This reverts commit5b2ed8b5ff
.
This commit is contained in:
parent
09d7ecbad8
commit
77bb4425e1
5 changed files with 49 additions and 44 deletions
|
@ -487,16 +487,6 @@ class theme_config {
|
|||
}
|
||||
}
|
||||
|
||||
// Use parent theme's "blockrtlmanipulations" if it was defined and if it was not defined on current theme.
|
||||
if (empty($this->blockrtlmanipulations)) {
|
||||
foreach ($this->parent_configs as $parent_config) {
|
||||
if (!empty($parent_config->blockrtlmanipulations)) {
|
||||
$this->blockrtlmanipulations = $parent_config->blockrtlmanipulations;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//fix arrows if needed
|
||||
$this->check_theme_arrows();
|
||||
}
|
||||
|
|
|
@ -174,7 +174,3 @@ $THEME->hidefromselector = true;
|
|||
/** List of javascript files that need to included on each page */
|
||||
$THEME->javascripts = array();
|
||||
$THEME->javascripts_footer = array();
|
||||
|
||||
// Swap side-pre with side-post blocks regions, in RTL mode (can be override on derived themes)
|
||||
$THEME->blockrtlmanipulations = array('side-pre'=>'side-post','side-post'=>'side-pre');
|
||||
|
||||
|
|
|
@ -10,9 +10,17 @@ $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custom
|
|||
|
||||
$bodyclasses = array();
|
||||
if ($showsidepre && !$showsidepost) {
|
||||
if (!right_to_left()) {
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
} else if ($showsidepost && !$showsidepre) {
|
||||
}else{
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
}
|
||||
} else if ($showsidepost && !$showsidepre) {
|
||||
if (!right_to_left()) {
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
}else{
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
}
|
||||
} else if (!$showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
@ -58,22 +66,29 @@ echo $OUTPUT->doctype() ?>
|
|||
</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
|
||||
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
|
||||
if (!right_to_left()) {
|
||||
echo $OUTPUT->blocks_for_region('side-post');
|
||||
?>
|
||||
} elseif ($hassidepre) {
|
||||
echo $OUTPUT->blocks_for_region('side-pre');
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
@ -25,9 +25,17 @@ if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
|
|||
|
||||
$bodyclasses = array();
|
||||
if ($showsidepre && !$showsidepost) {
|
||||
if (!right_to_left()) {
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
} else if ($showsidepost && !$showsidepre) {
|
||||
}else{
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
}
|
||||
} else if ($showsidepost && !$showsidepre) {
|
||||
if (!right_to_left()) {
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
}else{
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
}
|
||||
} else if (!$showsidepost && !$showsidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
@ -88,18 +96,29 @@ echo $OUTPUT->doctype() ?>
|
|||
</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 } ?>
|
||||
|
|
|
@ -98,18 +98,3 @@ body {margin:auto 0px;width:auto;}
|
|||
.ie6.pagelayout-report #report-region-wrap {float:none;width:200px;left:auto;position:absolute;top:0;}
|
||||
.ie6.pagelayout-report #report-region-pre,
|
||||
.ie6.pagelayout-report #report-region-pre .block {width:100%;}
|
||||
|
||||
/** Only side PRE **/
|
||||
.dir-rtl.side-pre-only #page-content #region-main-box {left:0px;}
|
||||
.dir-rtl.side-pre-only #page-content #region-post-box {margin-left:-200px;}
|
||||
.dir-rtl.side-pre-only #page-content #region-main {margin-left:200px;}
|
||||
.dir-rtl.side-pre-only #page-content #region-post {width:0px;}
|
||||
.dir-rtl.side-pre-only #page-content #region-pre {left:50%; width: 200px;}
|
||||
|
||||
/**RTL Only side POST **/
|
||||
.dir-rtl.side-post-only #page-content {clear:both;float:left;overflow:hidden;position:relative;width:100%;min-width:900px;}
|
||||
.dir-rtl.side-post-only #page-content #region-main-box {float:left;left:200px;position:relative;width:200%;}
|
||||
.dir-rtl.side-post-only #page-content #region-post-box {margin-left:-200px;}
|
||||
.dir-rtl.side-post-only #page-content #region-main {margin-left:200px;}
|
||||
.dir-rtl.side-post-only #page-content #region-pre {width: 0;}
|
||||
.dir-rtl.side-post-only #page-content #region-post {float:left;left:0px;overflow:hidden;position:relative;width:200px;margin-left:-50%;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue