Changeset 48718
- Timestamp:
- 08/04/2020 01:28:58 PM (4 years ago)
- Location:
- branches/5.5
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
-
branches/5.5/src/js/_enqueues/admin/postbox.js
r48650 r48718 395 395 start: function() { 396 396 $( 'body' ).addClass( 'is-dragging-metaboxes' ); 397 // Refresh the cached positions of all the sortable items so that the min-height set while dragging works. 398 $( '.meta-box-sortables' ).sortable( 'refreshPositions' ); 397 399 }, 398 400 stop: function() { … … 521 523 */ 522 524 _mark_area : function() { 523 var visibleSortables = $( '#dashboard-widgets .meta-box-sortables:visible, #post-body .meta-box-sortables:visible' ), 525 var visible = $( 'div.postbox:visible' ).length, 526 visibleSortables = $( '#dashboard-widgets .meta-box-sortables:visible, #post-body .meta-box-sortables:visible' ), 524 527 areAllVisibleSortablesEmpty = true; 525 528 … … 527 530 var t = $(this); 528 531 529 if ( t.children('.postbox:visible').length ) {532 if ( visible == 1 || t.children( '.postbox:visible' ).length ) { 530 533 t.removeClass('empty-container'); 531 534 areAllVisibleSortablesEmpty = false; … … 543 546 * 544 547 * @since 5.5.0 548 * 549 * @param {Object} visibleSortables The jQuery object representing the visible sortable areas. 550 * @param {boolean} areAllVisibleSortablesEmpty Whether all the visible sortable areas are "empty". 545 551 * 546 552 * @return {void} -
branches/5.5/src/wp-admin/css/common.css
r48671 r48718 28 28 width: 100%; 29 29 overflow: visible; 30 } 31 32 /* inner 2 column liquid layout */ 33 34 .inner-sidebar { 35 float: right; 36 clear: right; 37 display: none; 38 width: 281px; 39 position: relative; 40 } 41 42 .columns-2 .inner-sidebar { 43 margin-right: auto; 44 width: 286px; 45 display: block; 46 } 47 48 .inner-sidebar #side-sortables, 49 .columns-2 .inner-sidebar #side-sortables { 50 min-height: 300px; 51 width: 280px; 52 padding: 0; 53 } 54 55 .has-right-sidebar .inner-sidebar { 56 display: block; 57 } 58 59 .has-right-sidebar #post-body { 60 float: left; 61 clear: left; 62 width: 100%; 63 margin-right: -2000px; 64 } 65 66 .has-right-sidebar #post-body-content { 67 margin-right: 300px; 68 float: none; 69 width: auto; 30 70 } 31 71 … … 1946 1986 } 1947 1987 1948 .metabox-holder .postbox-container . empty-container{1949 outline: 3px dashed #b4b9be;1950 height: 250px;1988 .metabox-holder .postbox-container .meta-box-sortables { 1989 /* The jQuery UI Sortables need some initial height to work properly. */ 1990 min-height: 1px; 1951 1991 position: relative; 1952 1992 } -
branches/5.5/src/wp-admin/css/dashboard.css
r48671 r48718 53 53 min-height: 100px; 54 54 margin: 0 8px 20px; 55 } 56 57 #dashboard-widgets .postbox-container .empty-container { 58 outline: 3px dashed #b4b9be; 59 height: 250px; 55 60 } 56 61 -
branches/5.5/src/wp-admin/css/edit.css
r48368 r48718 149 149 /* Post Screen */ 150 150 151 /* Only target the sortables in the post screen excluding the ones in the Dashboard. */152 #post-body .meta-box-sortables {153 /* Required min-height to make the jQuery UI Sortable drop zone work. */154 min-height: 1px;155 }156 157 /* Resets height and outline inherited from common.css. */158 #post-body.columns-1 #side-sortables.empty-container,159 #post-body #normal-sortables.empty-container,160 #post-body #advanced-sortables.empty-container {161 /* Sortables need some initial height to work correctly. */162 height: 1px;163 outline: none;164 }165 166 151 /* Only highlight drop zones when dragging and only in the 2 columns layout. */ 167 .is-dragging-metaboxes #post-body.columns-2 #side-sortables, 168 .is-dragging-metaboxes #post-body #normal-sortables, 169 .is-dragging-metaboxes #post-body #advanced-sortables { 152 .is-dragging-metaboxes .metabox-holder .postbox-container .meta-box-sortables { 170 153 outline: 3px dashed #606a73; 171 154 /* Prevent margin on the child from collapsing with margin on the parent. */ … … 1543 1526 #poststuff #postbox-container-1 .empty-container, 1544 1527 #poststuff #postbox-container-1 #side-sortables:empty { 1545 outline: none;1546 1528 height: 0; 1547 1529 min-height: 0; … … 1551 1533 min-height: 0; 1552 1534 width: auto; 1535 } 1536 1537 /* Increase min-height while dragging for the #side-sortables and any potential sortables area with custom ID. */ 1538 .is-dragging-metaboxes #poststuff #postbox-container-1 .empty-container, 1539 .is-dragging-metaboxes #poststuff #postbox-container-1 #side-sortables:empty, 1540 .is-dragging-metaboxes #poststuff #post-body.columns-2 #side-sortables, 1541 .is-dragging-metaboxes #poststuff #post-body.columns-2 .meta-box-sortables { 1542 height: auto; 1543 min-height: 60px; 1553 1544 } 1554 1545
Note: See TracChangeset
for help on using the changeset viewer.