Ticket #32395: 32395.3.diff
File 32395.3.diff, 6.2 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/list-tables.css
423 423 content: '\f140'; 424 424 } 425 425 426 .wp-list-table .toggle-row { 427 position: absolute; 428 right: 8px; 429 top: 10px; 430 display: none; 431 padding: 0; 432 width: 40px; 433 height: 40px; 434 border: none; 435 outline: none; 436 background: transparent; 437 } 438 439 .wp-list-table .toggle-row:hover { 440 cursor: pointer; 441 } 442 443 .wp-list-table .toggle-row:focus { 444 -webkit-box-shadow: 445 0 0 0 1px #5b9dd9, 446 0 0 2px 1px rgba(30, 140, 190, .8); 447 box-shadow: 448 0 0 0 1px #5b9dd9, 449 0 0 2px 1px rgba(30, 140, 190, .8); 450 } 451 452 .ie8 .wp-list-table .toggle-row:focus { 453 outline: #5b9dd9 solid 1px; 454 } 455 456 .wp-list-table .toggle-row:active { 457 -webkit-box-shadow: none; 458 box-shadow: none; 459 } 460 461 .wp-list-table .toggle-row:before { 462 position: absolute; 463 top: 0; 464 left: 10px; 465 display: block; 466 padding: 0; 467 color: #666; 468 content: '\f140'; 469 font: normal 20px/1 'dashicons'; 470 line-height: 10px; 471 -webkit-font-smoothing: antialiased; 472 -moz-osx-font-smoothing: grayscale; 473 speak: none; 474 } 475 476 .wp-list-table .is-expanded .toggle-row:before { 477 content: '\f142'; 478 } 479 426 480 tr.wp-locked .locked-indicator { 427 481 margin-left: 6px; 428 482 height: 20px; … … 1644 1698 font-size: 14px; 1645 1699 } 1646 1700 1647 /* Columns to hide */ 1648 .fixed .column-date, 1649 .fixed .column-author, 1650 .column-categories, 1651 .column-tags, 1652 .tags .column-description, 1653 .media .column-parent, 1654 .media .column-comments, 1655 .users .column-email, 1656 .users .column-name, 1657 .sites .column-registered, 1658 .sites .column-users { 1701 .wp-list-table th:not(.column-primary), 1702 .wp-list-table th:not(.column-primary), 1703 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) { 1659 1704 display: none; 1660 1705 } 1661 1706 1662 .fixed .column-comment .comment-author { 1707 /* Checkboxes need to show */ 1708 .wp-list-table th.check-column { 1709 display: table-cell; 1710 width: 35px; 1711 } 1712 1713 .wp-list-table .toggle-row { 1663 1714 display: block; 1664 1715 } 1665 1716 1666 /* Posts */ 1667 .column-title { 1668 width: 85%; 1717 .wp-list-table tr:not(.inline-edit-row) td { 1718 position: relative; 1719 clear: both; 1720 display: block; 1721 width: auto !important; /* needs to override some columns that are more specifically targeted */ 1669 1722 } 1670 1723 1671 . fixed .column-comments, .widefat .check-column{1672 width: 35px1724 .wp-list-table td.column-primary { 1725 padding-right: 50px; /* space for toggle button */ 1673 1726 } 1674 1727 1728 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) { 1729 padding: 3px 8px 3px 35% !important; /* space for the label */ 1730 } 1731 1732 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary)::before { 1733 position: absolute; 1734 left: 10px; /* match padding of regular table cell */ 1735 display: block; 1736 overflow: hidden; 1737 width: 32%; /* leave a little space for a gutter */ 1738 content: attr(data-colname); 1739 white-space: nowrap; 1740 text-overflow: ellipsis; 1741 } 1742 1743 .wp-list-table .is-expanded td:not(.hidden) { 1744 display: block !important; 1745 } 1746 1747 .fixed .column-comment .comment-author { 1748 display: block; 1749 } 1750 1675 1751 .widefat thead .check-column, .widefat tfoot .check-column { 1676 1752 padding: 10px 0 10px; 1677 1753 } -
src/wp-admin/includes/class-wp-list-table.php
497 497 } 498 498 $out .= '</div>'; 499 499 500 $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>'; 501 500 502 return $out; 501 503 } 502 504 … … 921 923 * @param bool $with_id Whether to set the id attribute or not 922 924 */ 923 925 public function print_column_headers( $with_id = true ) { 924 list( $columns, $hidden, $sortable ) = $this->get_column_info();926 list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); 925 927 926 928 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 927 929 $current_url = remove_query_arg( 'paged', $current_url ); … … 955 957 elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) 956 958 $class[] = 'num'; 957 959 960 if ( $column_key === $primary ) { 961 $class[] = 'column-primary'; 962 } 963 958 964 if ( isset( $sortable[$column_key] ) ) { 959 965 list( $orderby, $desc_first ) = $sortable[$column_key]; 960 966 -
src/wp-admin/includes/class-wp-posts-list-table.php
726 726 $classes .= ' hidden'; 727 727 } 728 728 729 $attributes = "class='$classes'"; 729 // Comments is a special case, as its column display name contains HTML 730 if ( 'comments' === $column_name ) { 731 $data = 'data-colname="' . esc_attr__( 'Comments' ) . '"'; 732 } else { 733 $data = 'data-colname="' . esc_attr( $column_display_name ) . '"'; 734 } 730 735 736 $attributes = "class='$classes' $data"; 737 731 738 if ( 'cb' === $column_name ) { 732 739 ?> 733 740 <th scope="row" class="check-column"> -
src/wp-admin/js/common.js
480 480 } 481 481 }, 'td.has-row-actions' ); 482 482 483 // Toggle list table rows on small screens 484 $( 'tbody' ).on( 'click', '.toggle-row', function() { 485 $( this ).closest( 'tr' ).toggleClass( 'is-expanded' ); 486 }); 487 483 488 $('#default-password-nag-no').click( function() { 484 489 setUserSetting('default_password_nag', 'hide'); 485 490 $('div.default-password-nag').hide(); -
src/wp-admin/js/inline-edit-post.js
133 133 editRow = $('#inline-edit').clone(true); 134 134 $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); 135 135 136 $(t.what+id). hide().after(editRow).after('<tr class="hidden"></tr>');136 $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>'); 137 137 138 138 // populate the data 139 139 rowData = $('#inline_'+id);