Don't show dashed border on empty postbox containers under the editor, see #20015

git-svn-id: http://svn.automattic.com/wordpress/trunk@20293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2012-03-28 02:10:19 +00:00
parent a280584422
commit 09360b1a92
2 changed files with 47 additions and 25 deletions

View File

@ -1835,7 +1835,6 @@ body.admin-bar {
}
.postbox-container .meta-box-sortables {
min-height: 50px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
@ -1847,7 +1846,8 @@ body.admin-bar {
height: 0;
}
.metabox-holder .postbox-container .empty-container {
.metabox-holder .postbox-container .empty-container,
#post-body.columns-2 #side-sortables:empty {
border: 3px dashed #CCCCCC;
height: 250px;
}
@ -1888,8 +1888,12 @@ body.admin-bar {
width: 280px;
}
#post-body.columns-2 #side-sortables {
min-height: 250px;
}
/* one column on the dash */
@media only screen and (max-width: 768px) {
@media only screen and (max-width: 799px) {
#wpbody-content #dashboard-widgets .postbox-container {
width: 100%;
}
@ -1902,7 +1906,7 @@ body.admin-bar {
}
/* two columns on the dash, but keep the setting if one is selected */
@media only screen and (min-width: 768px) and (max-width: 1200px) {
@media only screen and (min-width: 800px) and (max-width: 1200px) {
#wpbody-content #dashboard-widgets .postbox-container {
width: 49.5%;
}
@ -1914,9 +1918,9 @@ body.admin-bar {
width: 50.5%;
}
#wpbody-content .metabox-holder .postbox-container .empty-container,
#wpbody-content #postbox-container-3 .empty-container,
#wpbody-content #postbox-container-4 .empty-container {
#dashboard-widgets.metabox-holder .postbox-container .empty-container,
#dashboard-widgets #postbox-container-3 .empty-container,
#dashboard-widgets #postbox-container-4 .empty-container {
border: 0 none;
height: 0;
min-height: 0;
@ -1945,7 +1949,7 @@ body.admin-bar {
}
/* one column on the post write/edit screen */
@media only screen and (max-width: 1024px) {
@media only screen and (max-width: 1025px) {
#wpbody-content #poststuff #post-body {
margin: 0;
}
@ -1955,6 +1959,17 @@ body.admin-bar {
width: 100%;
}
#poststuff #postbox-container-1 .empty-container,
#poststuff #postbox-container-1 #side-sortables:empty {
border: 0 none;
height: 0;
min-height: 0;
}
#poststuff #post-body.columns-2 #side-sortables {
min-height: 0;
}
/* hide the radio buttons for column prefs */
.screen-layout,
.columns-prefs {

View File

@ -129,9 +129,9 @@ var postboxes, is_iPad = navigator.userAgent.match(/iPad/);
},
_mark_area : function() {
var visible = $('div.postbox:visible').length;
var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables');
$('#post-body .meta-box-sortables:visible, #dashboard-widgets .meta-box-sortables:visible').not('#advanced-sortables').each(function(n, el){
$('#dashboard-widgets .meta-box-sortables:visible').each(function(n, el){
var t = $(this);
if ( visible == 1 || t.children('.postbox:visible').length )
@ -139,6 +139,13 @@ var postboxes, is_iPad = navigator.userAgent.match(/iPad/);
else
t.addClass('empty-container');
});
if ( side.length ) {
if ( side.children('.postbox:visible').length )
side.removeClass('empty-container');
else if ( $('#postbox-container-1').css('width') == '280px' )
side.addClass('empty-container');
}
},
_pb_edit : function(n) {