Make WordPress Core

Ticket #32395: 32395.5.diff

File 32395.5.diff, 21.0 KB (added by helen, 10 years ago)
  • src/wp-admin/css/list-tables.css

     
    427427        content: '\f140';
    428428}
    429429
     430.wp-list-table .toggle-row {
     431        position: absolute;
     432        right: 8px;
     433        top: 10px;
     434        display: none;
     435        padding: 0;
     436        width: 40px;
     437        height: 40px;
     438        border: none;
     439        outline: none;
     440        background: transparent;
     441}
     442
     443.wp-list-table .toggle-row:hover {
     444        cursor: pointer;
     445}
     446
     447.wp-list-table .toggle-row:focus {
     448    -webkit-box-shadow:
     449        0 0 0 1px #5b9dd9,
     450                0 0 2px 1px rgba(30, 140, 190, .8);
     451    box-shadow:
     452        0 0 0 1px #5b9dd9,
     453                0 0 2px 1px rgba(30, 140, 190, .8);
     454}
     455
     456.ie8 .wp-list-table .toggle-row:focus {
     457        outline: #5b9dd9 solid 1px;
     458}
     459
     460.wp-list-table .toggle-row:active {
     461        -webkit-box-shadow: none;
     462        box-shadow: none;
     463}
     464
     465.wp-list-table .toggle-row:before {
     466        position: absolute;
     467        top: 0;
     468        left: 10px;
     469        display: block;
     470        padding: 0;
     471        color: #666;
     472        content: '\f140';
     473        font: normal 20px/1 'dashicons';
     474        line-height: 10px;
     475        -webkit-font-smoothing: antialiased;
     476        -moz-osx-font-smoothing: grayscale;
     477        speak: none;
     478}
     479
     480.wp-list-table .is-expanded .toggle-row:before {
     481        content: '\f142';
     482}
     483
    430484tr.wp-locked .locked-indicator {
    431485        margin-left: 6px;
    432486        height: 20px;
     
    16471701                font-size: 14px;
    16481702        }
    16491703
    1650         /* Columns to hide */
    1651         .fixed .column-date,
    1652         .fixed .column-author,
    1653         .column-categories,
    1654         .column-tags,
    1655         .tags .column-description,
    1656         .media .column-parent,
    1657         .media .column-comments,
    1658         .users .column-email,
    1659         .users .column-name,
    1660         .sites .column-registered,
    1661         .sites .column-users {
     1704        .wp-list-table th:not(.column-primary),
     1705        .wp-list-table th:not(.column-primary),
     1706        .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) {
    16621707                display: none;
    16631708        }
    16641709
     1710        /* Checkboxes need to show */
     1711        .wp-list-table th.check-column {
     1712                display: table-cell;
     1713                width: 35px;
     1714        }
     1715
     1716        .wp-list-table .toggle-row {
     1717                display: block;
     1718        }
     1719
     1720        .wp-list-table tr:not(.inline-edit-row) td {
     1721                position: relative;
     1722                clear: both;
     1723                display: block;
     1724                width: auto !important; /* needs to override some columns that are more specifically targeted */
     1725        }
     1726
     1727        .wp-list-table td.column-primary {
     1728                padding-right: 50px; /* space for toggle button */
     1729        }
     1730
     1731        .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary) {
     1732                padding: 3px 8px 3px 35% !important; /* space for the label */
     1733        }
     1734
     1735        .wp-list-table tr:not(.inline-edit-row) td:not(.column-primary)::before {
     1736                position: absolute;
     1737                left: 10px; /* match padding of regular table cell */
     1738                display: block;
     1739                overflow: hidden;
     1740                width: 32%; /* leave a little space for a gutter */
     1741                content: attr(data-colname);
     1742                white-space: nowrap;
     1743                text-overflow: ellipsis;
     1744        }
     1745
     1746        .wp-list-table .is-expanded td:not(.hidden) {
     1747                display: block !important;
     1748                overflow: hidden; /* clearfix */
     1749        }
     1750
     1751        /* Special cases */
     1752        .widefat .num,
     1753        .column-posts {
     1754                text-align: left;
     1755        }
     1756
     1757        #comments-form .fixed .column-author {
     1758                display: none !important;
     1759        }
     1760
    16651761        .fixed .column-comment .comment-author {
    16661762                display: block;
    16671763        }
    16681764
    1669         /* Posts */
    1670         .column-title {
    1671                 width: 85%;
     1765        #the-comment-list .is-expanded td {
     1766                -webkit-box-shadow: none;
     1767                box-shadow: none;
    16721768        }
    16731769
    1674         .fixed .column-comments, .widefat .check-column {
    1675                 width: 35px
     1770        #the-comment-list .is-expanded td:last-child {
     1771                -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
     1772                box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    16761773        }
    16771774
    16781775        .widefat thead .check-column, .widefat tfoot .check-column {
     
    16831780                word-wrap: normal;
    16841781        }
    16851782
    1686         /* Media */
    1687         .media .column-title {
    1688                 width: auto;
    1689         }
    1690 
    16911783        /* Quick Edit and Bulk Edit */
    16921784        #wpbody-content .quick-edit-row-post .inline-edit-col-left,
    16931785        #wpbody-content .quick-edit-row-post .inline-edit-col-right,
     
    17631855                height: 22px;
    17641856        }
    17651857
    1766         /* Taxonomies */
    1767         .tags .column-posts {
    1768                 width: 74px;
    1769         }
    1770 
    1771         .tags .column-slug {
    1772                 width: 30%;
    1773         }
    1774 
    1775         /* Comments */
    1776         .comments .column-response {
    1777                 width: 35%;
    1778         }
    1779 
    1780         /* Users */
    1781         .users .column-role {
    1782                 width: 35%;
    1783         }
    1784 
    1785         /* Network admin sites */
    1786         .sites .column-blogname {
    1787                 width: 55%;
    1788         }
    1789 
    17901858        /* Updates */
    17911859        #wpbody-content #update-themes-table .plugin-title {
    17921860                width: auto;
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    395395                $this->display_tablenav( 'top' );
    396396
    397397?>
    398 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>">
     398<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
    399399        <thead>
    400400        <tr>
    401401                <?php $this->print_column_headers(); ?>
     
    466466                        return;
    467467                }
    468468
     469                if ( $primary !== $column_name ) {
     470                        return '';
     471                }
     472
    469473                $post = get_post();
    470474
    471475                $the_comment_status = wp_get_comment_status( $comment->comment_ID );
    472476
    473477                $out = '';
    474478
    475                 if ( $primary === $column_name ) {
    476                         $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
    477                         $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
     479                $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
     480                $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
    478481
    479                         $url = "comment.php?c=$comment->comment_ID";
     482                $url = "comment.php?c=$comment->comment_ID";
    480483
    481                         $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce" );
    482                         $unapprove_url = esc_url( $url . "&action=unapprovecomment&$approve_nonce" );
    483                         $spam_url = esc_url( $url . "&action=spamcomment&$del_nonce" );
    484                         $unspam_url = esc_url( $url . "&action=unspamcomment&$del_nonce" );
    485                         $trash_url = esc_url( $url . "&action=trashcomment&$del_nonce" );
    486                         $untrash_url = esc_url( $url . "&action=untrashcomment&$del_nonce" );
    487                         $delete_url = esc_url( $url . "&action=deletecomment&$del_nonce" );
     484                $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce" );
     485                $unapprove_url = esc_url( $url . "&action=unapprovecomment&$approve_nonce" );
     486                $spam_url = esc_url( $url . "&action=spamcomment&$del_nonce" );
     487                $unspam_url = esc_url( $url . "&action=unspamcomment&$del_nonce" );
     488                $trash_url = esc_url( $url . "&action=trashcomment&$del_nonce" );
     489                $untrash_url = esc_url( $url . "&action=untrashcomment&$del_nonce" );
     490                $delete_url = esc_url( $url . "&action=deletecomment&$del_nonce" );
    488491
    489                         // Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash.
    490                         $actions = array(
    491                                 'approve' => '', 'unapprove' => '',
    492                                 'reply' => '',
    493                                 'quickedit' => '',
    494                                 'edit' => '',
    495                                 'spam' => '', 'unspam' => '',
    496                                 'trash' => '', 'untrash' => '', 'delete' => ''
    497                         );
     492                // Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash.
     493                $actions = array(
     494                        'approve' => '', 'unapprove' => '',
     495                        'reply' => '',
     496                        'quickedit' => '',
     497                        'edit' => '',
     498                        'spam' => '', 'unspam' => '',
     499                        'trash' => '', 'untrash' => '', 'delete' => ''
     500                );
    498501
    499                         // Not looking at all comments.
    500                         if ( $comment_status && 'all' != $comment_status ) {
    501                                 if ( 'approved' == $the_comment_status ) {
    502                                         $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved' class='vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    503                                 } elseif ( 'unapproved' == $the_comment_status ) {
    504                                         $actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved' class='vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    505                                 }
    506                         } else {
    507                                 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    508                                 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
     502                // Not looking at all comments.
     503                if ( $comment_status && 'all' != $comment_status ) {
     504                        if ( 'approved' == $the_comment_status ) {
     505                                $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved' class='vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
     506                        } elseif ( 'unapproved' == $the_comment_status ) {
     507                                $actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved' class='vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    509508                        }
     509                } else {
     510                        $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
     511                        $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
     512                }
    510513
    511                         if ( 'spam' != $the_comment_status ) {
    512                                 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
    513                         } elseif ( 'spam' == $the_comment_status ) {
    514                                 $actions['unspam'] = "<a href='$unspam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1' class='vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>';
    515                         }
     514                if ( 'spam' != $the_comment_status ) {
     515                        $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
     516                } elseif ( 'spam' == $the_comment_status ) {
     517                        $actions['unspam'] = "<a href='$unspam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1' class='vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>';
     518                }
    516519
    517                         if ( 'trash' == $the_comment_status ) {
    518                                 $actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1' class='vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
    519                         }
     520                if ( 'trash' == $the_comment_status ) {
     521                        $actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1' class='vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
     522                }
    520523
    521                         if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
    522                                 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1' class='delete vim-d vim-destructive'>" . __( 'Delete Permanently' ) . '</a>';
    523                         } else {
    524                                 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
    525                         }
     524                if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
     525                        $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1' class='delete vim-d vim-destructive'>" . __( 'Delete Permanently' ) . '</a>';
     526                } else {
     527                        $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
     528                }
    526529
    527                         if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
    528                                 $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__( 'Edit comment' ) . "'>". __( 'Edit' ) . '</a>';
     530                if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
     531                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__( 'Edit comment' ) . "'>". __( 'Edit' ) . '</a>';
    529532
    530                                 $format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" title="%s" href="#">%s</a>';
     533                        $format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" title="%s" href="#">%s</a>';
    531534
    532                                 $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'edit', 'vim-q comment-inline',esc_attr__( 'Edit this item inline' ), __( 'Quick&nbsp;Edit' ) );
     535                        $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'edit', 'vim-q comment-inline',esc_attr__( 'Edit this item inline' ), __( 'Quick&nbsp;Edit' ) );
    533536
    534                                 $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
    535                         }
     537                        $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
     538                }
    536539
    537                         /** This filter is documented in wp-admin/includes/dashboard.php */
    538                         $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
     540                /** This filter is documented in wp-admin/includes/dashboard.php */
     541                $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
    539542
    540                         $i = 0;
    541                         $out .= '<div class="row-actions">';
    542                         foreach ( $actions as $action => $link ) {
    543                                 ++$i;
    544                                 ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
     543                $i = 0;
     544                $out .= '<div class="row-actions">';
     545                foreach ( $actions as $action => $link ) {
     546                        ++$i;
     547                        ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
    545548
    546                                 // Reply and quickedit need a hide-if-no-js span when not added with ajax
    547                                 if ( ( 'reply' == $action || 'quickedit' == $action ) && ! defined('DOING_AJAX') )
    548                                         $action .= ' hide-if-no-js';
    549                                 elseif ( ( $action == 'untrash' && $the_comment_status == 'trash' ) || ( $action == 'unspam' && $the_comment_status == 'spam' ) ) {
    550                                         if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )
    551                                                 $action .= ' approve';
    552                                         else
    553                                                 $action .= ' unapprove';
    554                                 }
     549                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
     550                        if ( ( 'reply' == $action || 'quickedit' == $action ) && ! defined('DOING_AJAX') )
     551                                $action .= ' hide-if-no-js';
     552                        elseif ( ( $action == 'untrash' && $the_comment_status == 'trash' ) || ( $action == 'unspam' && $the_comment_status == 'spam' ) ) {
     553                                if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )
     554                                        $action .= ' approve';
     555                                else
     556                                        $action .= ' unapprove';
     557                        }
    555558
    556                                 $out .= "<span class='$action'>$sep$link</span>";
    557                         }
    558                         $out .= '</div>';
     559                        $out .= "<span class='$action'>$sep$link</span>";
    559560                }
     561                $out .= '</div>';
    560562
     563                $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
     564
    561565                return $out;
    562566        }
    563567
  • src/wp-admin/includes/class-wp-list-table.php

     
    497497                }
    498498                $out .= '</div>';
    499499
     500                $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
     501
    500502                return $out;
    501503        }
    502504
     
    921923         * @param bool $with_id Whether to set the id attribute or not
    922924         */
    923925        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();
    925927
    926928                $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    927929                $current_url = remove_query_arg( 'paged', $current_url );
     
    955957                        elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
    956958                                $class[] = 'num';
    957959
     960                        if ( $column_key === $primary ) {
     961                                $class[] = 'column-primary';
     962                        }
     963
    958964                        if ( isset( $sortable[$column_key] ) ) {
    959965                                list( $orderby, $desc_first ) = $sortable[$column_key];
    960966
     
    11391145                                $classes .= ' hidden';
    11401146                        }
    11411147
    1142                         $attributes = "class='$classes'";
     1148                        $data = 'data-colname="' . esc_attr( $column_display_name ) . '"';
    11431149
     1150                        $attributes = "class='$classes' $data";
     1151
    11441152                        if ( 'cb' == $column_name ) {
    11451153                                echo '<th scope="row" class="check-column">';
    11461154                                echo $this->column_cb( $item );
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

     
    403403                                $classes .= ' hidden';
    404404                        }
    405405
    406                         $attributes = "class='$classes'";
     406                        $data = 'data-colname="' . esc_attr( $column_display_name ) . '"';
    407407
     408                        $attributes = "class='$classes' $data";
     409
    408410                        if ( 'cb' === $column_name ) {
    409411                                echo '<th scope="row" class="check-column">';
    410412
  • src/wp-admin/includes/class-wp-ms-users-list-table.php

     
    336336                                $classes .= ' hidden';
    337337                        }
    338338
    339                         $attributes = "class='$classes'";
     339                        $data = 'data-colname="' . esc_attr( $column_display_name ) . '"';
    340340
     341                        $attributes = "class='$classes' $data";
     342
    341343                        if ( 'cb' === $column_name ) {
    342344                                echo '<th scope="row" class="check-column">';
    343345
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    973973                                $classes .= ' hidden';
    974974                        }
    975975
    976                         $attributes = "class='$classes'";
     976                        // Comments is a special case, as its column display name contains HTML
     977                        if ( 'comments' === $column_name ) {
     978                                $data = 'data-colname="' . esc_attr__( 'Comments' ) . '"';
     979                        } else {
     980                                $data = 'data-colname="' . esc_attr( $column_display_name ) . '"';
     981                        }
    977982
     983                        $attributes = "class='$classes' $data";
     984
    978985                        if ( 'cb' === $column_name ) {
    979986                                echo '<th scope="row" class="check-column">';
    980987
  • src/wp-admin/includes/class-wp-users-list-table.php

     
    419419                                $classes .= ' hidden';
    420420                        }
    421421
    422                         $attributes = "class='$classes'";
     422                        $data = 'data-colname="' . esc_attr( $column_display_name ) . '"';
    423423
     424                        $attributes = "class='$classes' $data";
     425
    424426                        if ( 'cb' === $column_name ) {
    425427                                $r .= "<th scope='row' class='check-column'>$checkbox</th>";
    426428                        } else {
  • src/wp-admin/js/common.js

     
    481481                }
    482482        }, 'td.has-row-actions' );
    483483
     484        // Toggle list table rows on small screens
     485        $( 'tbody' ).on( 'click', '.toggle-row', function() {
     486                $( this ).closest( 'tr' ).toggleClass( 'is-expanded' );
     487        });
     488
    484489        $('#default-password-nag-no').click( function() {
    485490                setUserSetting('default_password_nag', 'hide');
    486491                $('div.default-password-nag').hide();
  • src/wp-admin/js/inline-edit-post.js

     
    133133                editRow = $('#inline-edit').clone(true);
    134134                $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
    135135
    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>');
    137137
    138138                // populate the data
    139139                rowData = $('#inline_'+id);