Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Fix #711.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Aug 19, 2016
1 parent 082e4ae commit a6a9219
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 60 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
New in 3.0.1.8
==============
- FIX: Issue #710: Wrong profile image used.
- FIX: Issue #711: Space when blocks are docked.

New in 3.0.1.7
==============
Expand Down
6 changes: 3 additions & 3 deletions layout/columns3.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
<div class="row-fluid">
<?php
if ($tablet) {
echo '<div class="span12">';
echo '<div id="content" class="span12">';
} else if ($hasboringlayout) {
echo '<div class="span8 pull-right">';
echo '<div id="content" class="span8 pull-right">';
} else {
echo '<div class="span8 desktop-first-column">';
echo '<div id="content" class="span8 desktop-first-column">';
}
echo $OUTPUT->essential_blocks('page-top', 'row-fluid', 'aside', \theme_essential\toolbox::get_setting('pagetopblocksperrow'));
echo '<section id="region-main">';
Expand Down
4 changes: 2 additions & 2 deletions layout/frontpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@
<section id="<?php echo $regionbsid; ?>">
<?php
if (\theme_essential\toolbox::get_setting('frontpageblocks')) {
echo '<div class="span9 pull-right">';
echo '<div id="content" class="span9 pull-right">';
} else {
echo '<div class="span9 desktop-first-column">';
echo '<div id="content" class="span9 desktop-first-column">';
}
$fppagetopblocks = \theme_essential\toolbox::get_setting('fppagetopblocks');
if ($PAGE->user_is_editing() && ($fppagetopblocks)) {
Expand Down
6 changes: 3 additions & 3 deletions layout/mydashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
<div class="row-fluid">
<?php
if ($tablet) {
echo '<div class="span12">';
echo '<div id="content" class="span12">';
} else if ($hasboringlayout) {
echo '<div class="span8 pull-right">';
echo '<div id="content" class="span8 pull-right">';
} else {
echo '<div class="span8 desktop-first-column">';
echo '<div id="content" class="span8 desktop-first-column">';
}
echo $OUTPUT->essential_blocks('page-top', 'row-fluid', 'aside', \theme_essential\toolbox::get_setting('pagetopblocksperrow'));
echo '<section id="region-main">';
Expand Down
8 changes: 5 additions & 3 deletions layout/secure.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@
<div id="page-content" class="row-fluid">
<div id="region-bs-main-and-pre" class="span9">
<div class="row-fluid">
<section id="region-main" class="span8 pull-right">
<?php echo $OUTPUT->main_content(); ?>
</section>
<div id="content" class="span8 pull-right">
<section id="region-main">
<?php echo $OUTPUT->main_content(); ?>
</section>
</div>
<?php echo $OUTPUT->essential_blocks('side-pre', 'span4 desktop-first-column'); ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/tiles/pagesettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
$bodyclasses[] = 'modeditingmenu';
}

$regionbsid = 'region-bs-main-and-pre';
$regionbsid = 'main-and-pre';
$left = true;
if (right_to_left()) {
$left = false;
Expand Down
6 changes: 3 additions & 3 deletions layout/tiles/twocolumncontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
*/

if ($pagebottomregion) {
echo '<div class="span12">';
echo '<div id="content" class="span12">';
} else if ($hasboringlayout) {
echo '<div class="span9 pull-right">';
echo '<div id="content" class="span9 pull-right">';
} else {
echo '<div class="span9">';
echo '<div id="content" class="span9">';
}
echo $OUTPUT->essential_blocks('page-top', 'row-fluid', 'aside', \theme_essential\toolbox::get_setting('pagetopblocksperrow'));
echo '<section id="region-main">';
Expand Down
75 changes: 73 additions & 2 deletions less/essential/dock.less
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,88 @@ body.has_dock {
width: 300px;
}
&.empty-region-side-pre:not(.has-region-side-post) {
#region-bs-main-and-pre {
#main-and-pre {
width: 100%;
}
}
&.empty-region-side-pre.empty-region-side-post {
#region-bs-main-and-pre {
#main-and-pre, #main-and-pre #content {
width: 100%;
}
}
&.docked-region-side-pre {
#main-and-pre #content {
width: 100%;
#region-main {
width: auto;
}
}
}
&.used-region-side-pre.docked-region-side-post {
#main-and-pre {
width: 100%;
#content {
.fluid-span(9);
}
#block-region-side-pre {
.fluid-span(3);
}
}
}
&.jsenabled {
&.docked-region-side-pre {
&.empty-region-side-pre {
&.used-region-side-post {
#region-main {
width: auto;
}
}
}
}
}
}

@media (min-width: 1200px) {
.fluid-span (@columns) {
.fluid-span-full(@columns, @fluidGridColumnWidth1200, @fluidGridGutterWidth1200);
}
body.has_dock.used-region-side-pre.docked-region-side-post {
#main-and-pre {
#content {
.fluid-span(9);
}
#block-region-side-pre {
.fluid-span(3);
}
}
}
}

@media (min-width: 768px) and (max-width: 979px) {
.fluid-span (@columns) {
.fluid-span-full(@columns, @fluidGridColumnWidth768, @fluidGridGutterWidth768);
}
body.has_dock.used-region-side-pre.docked-region-side-post {
#main-and-pre {
#content {
.fluid-span(9);
}
#block-region-side-pre {
.fluid-span(3);
}
}
}
}

@media (max-width: 767px) {
body.has_dock.used-region-side-pre.docked-region-side-post {
#main-and-pre {
#content, #block-region-side-pre {
width: 100%;
}
}
}
}
/* @group Dock & Navbar */

.has_dock {
Expand Down
5 changes: 0 additions & 5 deletions less/essential/fixes.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ a[name="lastused"] {
z-index: 300;
}

// Correctly span the main element when no blocks are present in side-pre on frontpage
.empty-region-side-pre #region-bs-main-and-pre #region-main.span9 {
width: 100%;
}

// Fix opacity for hidden block menu - MDL-42634
.editing .block.invisible {
.opacity(100);
Expand Down
4 changes: 2 additions & 2 deletions less/essential/print.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
}

.side-post-only #page-content #region-main,
.side-post-only #page-content #region-bs-main-and-pre {
.side-post-only #page-content #main-and-pre {
margin-left: 0 !important;
}

#region-bs-main-and-pre.span9, #region-main.span8 {
#main-and-pre.span9, #region-main.span8 {
width: 100%;
}

Expand Down
24 changes: 0 additions & 24 deletions less/moodle/core.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,6 @@
display:none;
}

// Start Legacy styles. Deprecated since Moodle 2.9. See MDL-48160 for further information.
.content-only #region-main.span9, // Two column layout with no block or all blocks docked.
.empty-region-side-post #region-bs-main-and-pre.span9, // LTR with no post area.
.empty-region-side-pre #region-bs-main-and-post.span9, // RTL with no pre area.
.empty-region-side-post #region-bs-main-and-post.span9 #region-main.span8, // RTL with no post area.
.jsenabled.docked-region-side-post #region-bs-main-and-pre.span9, // LTR with all post blocks docked.
.jsenabled.docked-region-side-post #region-bs-main-and-post.span9 #region-main.span8,
.jsenabled.docked-region-side-pre #region-bs-main-and-post.span9 { // RTL with all pre blocks docked.
width: 100%;
}

.empty-region-side-pre #region-bs-main-and-pre.span9 #region-main, // LTR with no pre area.
.jsenabled.docked-region-side-pre #region-bs-main-and-pre.span9 #region-main { // LTR with all pre blocks docked.
// float: none; // I do not know why!
width: 100%;
}

.empty-region-side-pre #region-bs-main-and-post.span9 #region-main.span8, // RTL with no pre area.
.jsenabled.docked-region-side-pre #region-bs-main-and-post.span9 #region-main.span8 { // RTL with all pre blocks docked.
float: right;
}
// End Legacy styles.


// Default Three Columns - All
// ---------------------------

Expand Down
4 changes: 2 additions & 2 deletions style/essential-rtl.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style/essential-rtl_ie9-blessed1.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style/essential-rtl_ie9.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style/essential.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style/essential_ie9-blessed1.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions style/essential_ie9.css

Large diffs are not rendered by default.

0 comments on commit a6a9219

Please sign in to comment.