Ticket #32395: 32395.2.diff
File 32395.2.diff, 5.7 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 background: transparent; 436 } 437 438 .wp-list-table .toggle-row:hover { 439 cursor: pointer; 440 } 441 442 .wp-list-table .toggle-row:focus { 443 color: #124964; 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:before { 457 position: absolute; 458 top: 0; 459 left: 10px; 460 display: block; 461 padding: 0; 462 color: #666; 463 content: '\f140'; 464 font: normal 20px/1 'dashicons'; 465 line-height: 10px; 466 -webkit-font-smoothing: antialiased; 467 -moz-osx-font-smoothing: grayscale; 468 speak: none; 469 } 470 471 .wp-list-table .is-expanded .toggle-row:before { 472 content: '\f142'; 473 } 474 426 475 tr.wp-locked .locked-indicator { 427 476 margin-left: 6px; 428 477 height: 20px; … … 1644 1693 font-size: 14px; 1645 1694 } 1646 1695 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 { 1696 .wp-list-table th:not(.column-primary), 1697 .wp-list-table th:not(.column-primary), 1698 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) { 1659 1699 display: none; 1660 1700 } 1661 1701 1662 .fixed .column-comment .comment-author { 1702 /* Checkboxes need to show */ 1703 .wp-list-table th.check-column { 1704 display: table-cell; 1705 width: 35px; 1706 } 1707 1708 .wp-list-table .toggle-row { 1663 1709 display: block; 1664 1710 } 1665 1711 1666 /* Posts */ 1667 .column-title { 1668 width: 85%; 1712 .wp-list-table tr:not(.inline-edit-row) td { 1713 position: relative; 1714 clear: both; 1715 display: block; 1716 width: auto !important; /* needs to override some columns that are more specifically targeted */ 1669 1717 } 1670 1718 1671 . fixed .column-comments, .widefat .check-column{1672 width: 35px1719 .wp-list-table td.column-primary { 1720 padding-right: 50px; /* space for toggle button */ 1673 1721 } 1674 1722 1723 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) { 1724 padding: 3px 8px 3px 35% !important; /* space for the label */ 1725 } 1726 1727 .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary)::before { 1728 position: absolute; 1729 left: 10px; /* match padding of regular table cell */ 1730 display: block; 1731 overflow: hidden; 1732 width: 32%; /* leave a little space for a gutter */ 1733 content: attr(data-colname); 1734 white-space: nowrap; 1735 text-overflow: ellipsis; 1736 } 1737 1738 .wp-list-table .is-expanded td { 1739 display: block !important; 1740 } 1741 1742 .fixed .column-comment .comment-author { 1743 display: block; 1744 } 1745 1675 1746 .widefat thead .check-column, .widefat tfoot .check-column { 1676 1747 padding: 10px 0 10px; 1677 1748 } … … 1907 1978 } 1908 1979 1909 1980 .widefat tbody th.check-column input[type="checkbox"] { 1910 margin-top: - 3px;1981 margin-top: -4px; 1911 1982 margin-left: 8px; 1912 1983 } 1913 1984 -
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 ); … … 957 959 elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) 958 960 $class[] = 'num'; 959 961 962 if ( $column_key === $primary ) { 963 $class[] = 'column-primary'; 964 } 965 960 966 if ( isset( $sortable[$column_key] ) ) { 961 967 list( $orderby, $desc_first ) = $sortable[$column_key]; 962 968 -
src/wp-admin/includes/class-wp-posts-list-table.php
727 727 $style = ' style="display:none;"'; 728 728 } 729 729 730 $attributes = "class='$classes'$style"; 730 // Comments is a special case, as its column display name contains HTML 731 if ( 'comments' === $column_name ) { 732 $data = ' data-colname="' . esc_attr__( 'Comments' ) . '"'; 733 } else { 734 $data = ' data-colname="' . esc_attr( $column_display_name ) . '"'; 735 } 736 737 $attributes = "class='$classes'$style$data"; 731 738 732 739 if ( 'cb' === $column_name ) { 733 740 ?> -
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();