Make WordPress Core

Ticket #32253: 32253.4.patch

File 32253.4.patch, 7.9 KB (added by afercia, 8 years ago)
  • src/wp-admin/css/list-tables.css

     
    509509}
    510510
    511511/* Bulk Actions */
    512 .tablenav-pages a {
     512.tablenav-pages a,
     513.tablenav-pages-navspan {
    513514        font-weight: 600;
    514         margin-right: 1px;
    515515        padding: 0 2px;
    516516}
     517
    517518.tablenav-pages .current-page {
    518         padding-top: 0;
     519        margin: 0 2px 0 0;
     520        padding-bottom: 5px;
     521        font-size: 13px;
    519522        text-align: center;
    520523}
    521 .tablenav-pages .next-page {
     524
     525.tablenav .total-pages {
     526        margin-right: 2px;
     527}
     528
     529.tablenav #table-paging {
    522530        margin-left: 2px;
    523531}
    524532
     
    540548
    541549.tablenav .tablenav-pages {
    542550        float: right;
    543         display: block;
     551        height: 28px;
     552        margin-top: 3px;
    544553        cursor: default;
    545         height: 30px;
    546554        color: #555;
    547         line-height: 2.5;
    548         font-size: 12px;
    549555}
    550556
    551557.tablenav .no-pages,
     
    559565        padding: 3px 6px;
    560566}
    561567
    562 .tablenav .tablenav-pages a {
    563         padding: 0 10px 3px;
    564         background: #eee;
    565         background: rgba( 0, 0, 0, 0.05 );
     568.tablenav .tablenav-pages a,
     569.tablenav-pages-navspan {
    566570        display: inline-block;
     571        width: 7px;
     572        border: 1px solid #d2d2d2;
     573        padding: 3px 10px 7px;
     574        background: #e4e4e4;
    567575        font-size: 16px;
     576        line-height: 1;
    568577        font-weight: normal;
    569         line-height: 1.3333;
     578        text-align: center;
    570579}
    571580
     581.tablenav-pages-navspan {
     582        height: 16px;
     583        border-color: #e8e8e8;
     584        background: #ebebeb;
     585        color: #b4b4b4;
     586}
     587
    572588.tablenav .tablenav-pages a:hover,
    573589.tablenav .tablenav-pages a:focus {
     590        border-color: #5b9dd9;
    574591        color: #fff;
    575592        background: #00a0d2;
     593        -webkit-box-shadow: none;
     594        box-shadow: none;
     595        outline: none; /* IE8 */
    576596}
    577597
    578 .tablenav .tablenav-pages a.disabled,
    579 .tablenav .tablenav-pages a.disabled:hover,
    580 .tablenav .tablenav-pages a.disabled:focus,
    581 .tablenav .tablenav-pages a.disabled:active {
    582         color: #a0a5aa;
    583         background: #eee;
    584         background: rgba( 0, 0, 0, 0.05 );
    585 }
    586 
    587598.tablenav .displaying-num {
    588599        margin-right: 7px;
    589         color: #777;
    590         font-size: 12px;
    591         font-style: italic;
    592600}
    593601
    594602.tablenav .one-page .displaying-num {
    595603        display: inline-block;
    596         margin-top: 2px;
     604        margin-top: 5px;
    597605        margin-right: 0;
    598606}
    599607
     
    633641        float: right;
    634642        margin: 0 5px;
    635643        padding-top: 3px;
    636         /* line-height in px same as .tablenav height */
    637         line-height: 30px;
    638644}
    639645
    640646.wp-filter .view-switch {
     
    654660        height: 28px;
    655661        text-align: center;
    656662        line-height: 24px;
     663        text-decoration: none;
    657664}
    658665
    659666.view-switch a:before {
     
    15871594        .tablenav.bottom .displaying-num {
    15881595                position: absolute;
    15891596                right: 0;
    1590                 top: 10px;
     1597                top: 11px;
     1598                margin: 0;
    15911599                font-size: 14px;
    15921600        }
    15931601
    1594         .tablenav-pages {
     1602        .tablenav .tablenav-pages {
    15951603                width: 100%;
     1604                height: auto;
    15961605                text-align: center;
    15971606                margin: 0 0 25px;
    15981607        }
     
    16101619                height: 0;
    16111620        }
    16121621
    1613         .tablenav-pages .pagination-links .paging-input {
    1614                 font-size: 18px;
     1622        .tablenav-pages .pagination-links {
     1623                font-size: 16px;
    16151624        }
    16161625
    1617         .tablenav-pages .pagination-links a {
    1618                 padding: 8px 20px 11px;
    1619                 display: inline;
     1626        .tablenav-pages .pagination-links a,
     1627        .tablenav-pages-navspan {
     1628                padding: 9px 16px 12px;
    16201629                font-size: 18px;
    1621                 background: rgba(0, 0, 0, 0.05);
    16221630        }
    16231631
     1632        .tablenav-pages-navspan {
     1633                height: 18px;
     1634        }
     1635
    16241636        .tablenav-pages .pagination-links .current-page {
    1625                 padding: 10px;
    1626                 font-size: 14px;
     1637                padding: 8px 9px 9px;
     1638                font-size: 16px;
    16271639        }
    16281640
    16291641        /* WP List Table Adjustments: General */
  • src/wp-admin/includes/class-wp-list-table.php

     
    704704                $total_pages_before = '<span class="paging-input">';
    705705                $total_pages_after  = '</span>';
    706706
    707                 $disable_first = $disable_last = '';
    708                 if ( $current == 1 ) {
    709                         $disable_first = ' disabled';
     707                $disable_first = $disable_last = $disable_prev = $disable_next = false;
     708
     709                if ( $current == 1 ) {
     710                        $disable_first = true;
     711                        $disable_prev = true;
     712                }
     713                if ( $current == 2 ) {
     714                        $disable_first = true;
    710715                }
    711                 if ( $current == $total_pages ) {
    712                         $disable_last = ' disabled';
     716                if ( $current == $total_pages ) {
     717                        $disable_last = true;
     718                        $disable_next = true;
     719                }
     720                if ( $current == $total_pages - 1 ) {
     721                        $disable_last = true;
    713722                }
    714                 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    715                         'first-page' . $disable_first,
    716                         esc_url( remove_query_arg( 'paged', $current_url ) ),
    717                         __( 'First page' ),
    718                         '&laquo;'
    719                 );
    720723
    721                 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    722                         'prev-page' . $disable_first,
    723                         esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
    724                         __( 'Previous page' ),
    725                         '&lsaquo;'
    726                 );
     724                if ( $disable_first ) {
     725                        $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
     726                } else {
     727                        $page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     728                                esc_url( remove_query_arg( 'paged', $current_url ) ),
     729                                __( 'First page' ),
     730                                '&laquo;'
     731                        );
     732                }
    727733
     734                if ( $disable_prev ) {
     735                        $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
     736                } else {
     737                        $page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     738                                esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
     739                                __( 'Previous page' ),
     740                                '&lsaquo;'
     741                        );
     742                }
     743
    728744                if ( 'bottom' == $which ) {
    729745                        $html_current_page  = $current;
    730                         $total_pages_before = '<span id="table-paging" class="paging-input">';
     746                        $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">';
    731747                } else {
    732748                        $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
    733749                                '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
     
    738754                $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
    739755                $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
    740756
    741                 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    742                         'next-page' . $disable_last,
    743                         esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
    744                         __( 'Next page' ),
    745                         '&rsaquo;'
    746                 );
     757                if ( $disable_next ) {
     758                        $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
     759                } else {
     760                        $page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     761                                esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
     762                                __( 'Next page' ),
     763                                '&rsaquo;'
     764                        );
     765                }
    747766
    748                 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    749                         'last-page' . $disable_last,
    750                         esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
    751                         __( 'Last page' ),
    752                         '&raquo;'
    753                 );
     767                if ( $disable_last ) {
     768                        $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
     769                } else {
     770                        $page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     771                                esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
     772                                __( 'Last page' ),
     773                                '&raquo;'
     774                        );
     775                }
    754776
    755777                $pagination_links_class = 'pagination-links';
    756778                if ( ! empty( $infinite_scroll ) ) {