Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30010 FIX for pagelayout problems when moving blocks

  • Loading branch information...
commit 7b1009233f3370931ecd2c5146466f03ba34a853 1 parent 919e659
@lazydaisy lazydaisy authored
View
5 lib/blocklib.php
@@ -340,7 +340,10 @@ 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
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
25 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;}
Please sign in to comment.
Something went wrong with that request. Please try again.