Ticket #49288: 49288.10.diff
File 49288.10.diff, 5.3 KB (added by , 4 years ago) |
---|
-
src/js/_enqueues/admin/postbox.js
394 394 opacity: 0.65, 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() { 399 401 var $el = $( this ); … … 520 522 * @return {void} 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 526 529 visibleSortables.each( function() { 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; 532 535 } … … 543 546 * 544 547 * @since 5.5.0 545 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". 551 * 546 552 * @return {void} 547 553 */ 548 554 updateEmptySortablesText: function( visibleSortables, areAllVisibleSortablesEmpty ) { -
src/wp-admin/css/common.css
29 29 overflow: visible; 30 30 } 31 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; 70 } 71 32 72 /* 2 columns main area */ 33 73 34 74 #col-left { … … 1945 1985 padding-top: 10px; 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 } 1953 1993 -
src/wp-admin/css/dashboard.css
54 54 margin: 0 8px 20px; 55 55 } 56 56 57 #dashboard-widgets .postbox-container .empty-container { 58 outline: 3px dashed #b4b9be; 59 height: 250px; 60 } 61 57 62 /* Only highlight drop zones when dragging and only in the 2 columns layout. */ 58 63 .is-dragging-metaboxes #dashboard-widgets .meta-box-sortables { 59 64 outline: 3px dashed #606a73; -
src/wp-admin/css/edit.css
148 148 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. */ 172 155 display: flow-root; … … 1542 1525 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; 1548 1530 } … … 1552 1534 width: auto; 1553 1535 } 1554 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; 1544 } 1545 1555 1546 /* hide the radio buttons for column prefs */ 1556 1547 .screen-layout, 1557 1548 .columns-prefs {