Permalink
Browse files

MDL-30010FIX for pagelayout problems when moving blocks

  • Loading branch information...
1 parent de3476d commit 66e9f5c965f067bba48ae23f633f358536448b26 @lazydaisy lazydaisy committed with Sam Hemelryk Nov 6, 2011
View
4 lib/blocklib.php
@@ -347,7 +347,9 @@ public function region_has_content($region, $output) {
}
$this->check_is_loaded();
$this->ensure_content_created($region, $output);
- if ($this->page->user_is_editing() && $this->page->user_can_edit_blocks()) {
+ // if ($this->page->user_is_editing() && $this->page->user_can_edit_blocks()) {
+ // Mark Nielsen's patch - part 1
+ if ($this->page->user_is_editing() && $this->page->user_can_edit_blocks() && $this->movingblock) {
// If editing is on, we need all the block regions visible, for the
// move blocks UI.
return true;
View
14 theme/afterburner/style/afterburner_layout.css
@@ -116,7 +116,7 @@ PLEASE DO NOT ALTER THESE SETTINGS UNLESS YOU KNOW WHAT YOU ARE DOING AS IT WILL
------------------------------------------------------------------------------------------------*/
/*
SIDE-PRE-ONLY (Left Column + Middle Column)
----------------------------*/
+----------------------------------------*/
.side-pre-only #region-main-box {width: 200%; left: 220px;}
.side-pre-only #region-post-box {width: 100%; left: 50%; margin-left: -220px; background-color: #fff;}
.side-pre-only #region-main-wrap {width: 50%; right: 100%;}
@@ -126,7 +126,7 @@ SIDE-PRE-ONLY (Left Column + Middle Column)
.side-pre-only #region-post {width: 0px; left: 0px;}
/*
SIDE-POST-ONLY (Middle Column + Right Column)
-----------------------------*/
+------------------------------------------*/
.side-post-only #page-content { background-color: #fff;}
.side-post-only #region-main-box {width: 200%; left: 220px;}
.side-post-only #region-post-box {width: 100%; left: 50%; margin-left: -440px;}
@@ -136,8 +136,16 @@ SIDE-POST-ONLY (Middle Column + Right Column)
.side-post-only #region-pre {width: 0px;left: 0px;}
.side-post-only #region-post {width: 220px; left: 0px;}
/*
+SIDE-POST-ONLY WHEN MOVING BLOCKS (Left Column + Middle Column + Right Column)
+---------------------------------------------------------------------------*/
+.blocks-moving.side-post-only #region-main-box {left: 220px;}
+.blocks-moving.side-post-only #region-post-box {margin-left: -440px;}
+.blocks-moving.side-post-only #region-main-pad {margin: 0 10px 0 450px;}
+.blocks-moving.side-post-only #region-pre {width: 220px;left: 220px;}
+.blocks-moving.side-post-only #region-post {width: 220px;left: 0px;}
+/*
CONTENT ONLY - NO SIDE BLOCKS WHATSOEVER (Middle Column Only)
---------------------------------------------------------*/
+----------------------------------------------------------*/
.content-only #page-content { background-color: #fff;}
.content-only #region-main-box {width: 200%; left: 0px;}
.content-only #region-post-box {width: 100%; left: 50%; margin-left: 0px; background-color: #fff;}
View
7 theme/base/style/pagelayout.css
@@ -53,6 +53,13 @@ body {margin:auto 0px;width:auto;}
.side-post-only #page-content #region-pre {width:0px;}
.has_dock.side-post-only .page-middle #region-main {margin-left:200px;}
+/** Moving block when side-post-only **/
+.blocks-moving.side-post-only #page-content #region-main-box {left:200px;width:200%;}
+.blocks-moving.side-post-only #page-content #region-post-box {margin-left:-400px;}
+.blocks-moving.side-post-only #page-content #region-main {margin-left:400px;}
+.blocks-moving.side-post-only #page-content #region-pre {left:200px;width:200px;}
+.blocks-moving.side-post-only #page-content #region-post {left:0px;width:200px;}
+
/** No blocks whatsoever **/
.content-only #page-content {min-width:0;}
.content-only #page-content #region-main-box {left:0px;}
View
23 theme/canvas/style/pagelayout.css
@@ -64,4 +64,27 @@
.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
margin-left: 210px;
+}
+
+/** Moving blocks when side-post-only **/
+
+.blocks-moving.side-post-only #page-content #region-main-box {
+ left: 210px;
+}
+
+.blocks-moving.side-post-only #page-content #region-post-box {
+ margin-left: -420px;
+}
+
+.blocks-moving.side-post-only #page-content #region-main {
+ margin-left: 420px;
+}
+
+.blocks-moving.side-post-only #page-content #region-pre {
+left: 210px;
+ width: 210px;
+}
+
+.blocks-moving.side-post-only #page-content #region-post {
+ width: 210px;
}
View
146 theme/magazine/style/layout.css
@@ -1,150 +1,176 @@
#page-content {
- clear: both;
- float: left;
- overflow: visible;
- position: relative;
- width: 100%;
+ clear: both;
+ float: left;
+ overflow: visible;
+ position: relative;
+ width: 100%;
}
#page-content #region-main-box {
- float: left;
- right: 23%;
- position: relative;
- width: 100%;
- border: 0px solid #3333cc;
+ float: left;
+ right: 23%;
+ position: relative;
+ width: 100%;
+ border: 0px solid #3333cc;
}
#page-content #region-post-box {
- float: left;
- right: 54%;
- position: relative;
- width: 100%;
- border: 0px solid #3333cc;
+ float: left;
+ right: 54%;
+ position: relative;
+ width: 100%;
+ border: 0px solid #3333cc;
}
#page-content #region-main {
- float: left;
- left: 101%;
- overflow: visible;
- position: relative;
- width: 52%;
+ float: left;
+ left: 101%;
+ overflow: visible;
+ position: relative;
+ width: 52%;
}
#page-content #region-pre {
- float: left;
- left: 26%;
- overflow: visible;
- position: relative;
- width: 21%;
+ float: left;
+ left: 26%;
+ overflow: visible;
+ position: relative;
+ width: 21%;
}
#page-content #region-post {
- float: left;
- left: 82%;
- overflow: visible;
- position: relative;
- width: 21%;
+ float: left;
+ left: 82%;
+ overflow: visible;
+ position: relative;
+ width: 21%;
}
#page-content .region-content {
- overflow: visible;
- padding: 10px 0;
- border: 0px solid #3333cc;
+ overflow: visible;
+ padding: 10px 0;
+ border: 0px solid #3333cc;
}
#page-content {
- overflow: hidden
+ overflow: hidden
}
/** Only side pre **/
.side-pre-only #page-content #region-main-box {
- right: 0%;
+ right: 0%;
}
.side-pre-only #page-content #region-post-box {
- right: 77%;
+ right: 77%;
}
.side-pre-only #page-content #region-main {
- left: 100%;
- width: 77%;
+ left: 100%;
+ width: 77%;
}
.side-pre-only #page-content #region-main .region-content {
- overflow: hidden;
- padding: 20px 10px;
- padding-top: 10px;
+ overflow: hidden;
+ padding: 20px 10px;
+ padding-top: 10px;
}
.side-pre-only #page-content #region-pre {
- left: 1%;
- width: 21%;
+ left: 1%;
+ width: 21%;
}
.side-pre-only #page-content #region-post {
- width: 0%;
+ width: 0%;
}
/** Only side post **/
.side-post-only #page-content #region-main-box {
- right: 23%;
+ right: 23%;
}
.side-post-only #page-content #region-post-box {
- right: 76%;
+ right: 76%;
}
.side-post-only #page-content #region-main {
- left: 100%;
- width: 77%;
+ left: 100%;
+ width: 77%;
}
.side-post-only #page-content #region-main .region-content {
- overflow: hidden;
- padding: 20px 10px;
+ overflow: hidden;
+ padding: 20px 10px;
}
.side-post-only #page-content #region-post {
- left: 100%;
- width: 21%;
+ left: 100%;
+ width: 21%;
}
.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
- margin-left: 23%;
+ margin-left: 23%;
+}
+
+/** Moving blocks when side-post-only **/
+
+.blocks-moving.side-post-only #page-content #region-main-box {
+ right: 23%;
+ width: 100%;
+}
+
+.blocks-moving.side-post-only #page-content #region-post-box {
+ right: 54%;
+}
+
+.blocks-moving.side-post-only #page-content #region-main {
+ left: 101%;
+ width: 52%;
+}
+
+.blocks-moving.side-post-only #page-content #region-pre {
+ left: 26%;
+ width: 21%;
+}
+
+.blocks-moving.side-post-only #page-content #region-post {
+ left: 82%;
+ width: 21%;
}
/** No blocks whatsoever **/
.content-only #page-content #region-main-box {
- right: 0%;
+ right: 0%;
}
.content-only #page-content #region-post-box {
- right: 100%;
+ right: 100%;
}
.content-only #page-content #region-main {
- width: 98%;
+ width: 98%;
}
.content-only #page-content #region-pre {
- width: 0%;
+ width: 0%;
}
#region-pre {
- padding-top: 0px;
+ padding-top: 0px;
}
/** fix for some extra padding in side-post-only view **/
.side-post-only div.region-content {
- padding-top: 0px !important;
+ padding-top: 0px !important;
}
#region-post {
- padding-top: 0px;
+ padding-top: 0px;
}
.pagelayout-report #page-content #region-main {overflow:auto;}

0 comments on commit 66e9f5c

Please sign in to comment.