List tables: when post navigation links point to the current page, use <span>s and text instead of <a>s.

Props afercia.
Fixes #32253.

Built from https://develop.svn.wordpress.org/trunk@32948


git-svn-id: http://core.svn.wordpress.org/trunk@32919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-25 20:32:26 +00:00
parent 7a264022e7
commit 7537240d37
6 changed files with 157 additions and 111 deletions

View File

@ -513,16 +513,24 @@ th.asc a:focus span.sorting-indicator {
}
/* Bulk Actions */
.tablenav-pages a {
.tablenav-pages a,
.tablenav-pages-navspan {
font-weight: 600;
margin-left: 1px;
padding: 0 2px;
}
.tablenav-pages .current-page {
padding-top: 0;
margin: 0 0 0 2px;
padding-bottom: 5px;
font-size: 13px;
text-align: center;
}
.tablenav-pages .next-page {
.tablenav .total-pages {
margin-left: 2px;
}
.tablenav #table-paging {
margin-right: 2px;
}
@ -544,12 +552,10 @@ th.asc a:focus span.sorting-indicator {
.tablenav .tablenav-pages {
float: left;
display: block;
height: 28px;
margin-top: 3px;
cursor: default;
height: 30px;
color: #555;
line-height: 2.5;
font-size: 12px;
}
.tablenav .no-pages,
@ -563,41 +569,43 @@ th.asc a:focus span.sorting-indicator {
padding: 3px 6px;
}
.tablenav .tablenav-pages a {
padding: 0 10px 3px;
background: #eee;
background: rgba( 0, 0, 0, 0.05 );
.tablenav .tablenav-pages a,
.tablenav-pages-navspan {
display: inline-block;
width: 7px;
border: 1px solid #d2d2d2;
padding: 3px 10px 7px;
background: #e4e4e4;
font-size: 16px;
line-height: 1;
font-weight: normal;
line-height: 1.3333;
text-align: center;
}
.tablenav-pages-navspan {
height: 16px;
border-color: #e8e8e8;
background: #ebebeb;
color: #b4b4b4;
}
.tablenav .tablenav-pages a:hover,
.tablenav .tablenav-pages a:focus {
border-color: #5b9dd9;
color: #fff;
background: #00a0d2;
}
.tablenav .tablenav-pages a.disabled,
.tablenav .tablenav-pages a.disabled:hover,
.tablenav .tablenav-pages a.disabled:focus,
.tablenav .tablenav-pages a.disabled:active {
color: #a0a5aa;
background: #eee;
background: rgba( 0, 0, 0, 0.05 );
-webkit-box-shadow: none;
box-shadow: none;
outline: none; /* IE8 */
}
.tablenav .displaying-num {
margin-left: 7px;
color: #777;
font-size: 12px;
font-style: italic;
}
.tablenav .one-page .displaying-num {
display: inline-block;
margin-top: 2px;
margin-top: 5px;
margin-left: 0;
}
@ -637,8 +645,6 @@ classes exist in paginate_links() but not seen in list table output. */
float: left;
margin: 0 5px;
padding-top: 3px;
/* line-height in px same as .tablenav height */
line-height: 30px;
}
.wp-filter .view-switch {
@ -658,6 +664,7 @@ classes exist in paginate_links() but not seen in list table output. */
height: 28px;
text-align: center;
line-height: 24px;
text-decoration: none;
}
.view-switch a:before {
@ -1616,12 +1623,14 @@ div.action-links,
.tablenav.bottom .displaying-num {
position: absolute;
left: 0;
top: 10px;
top: 11px;
margin: 0;
font-size: 14px;
}
.tablenav-pages {
.tablenav .tablenav-pages {
width: 100%;
height: auto;
text-align: center;
margin: 0 0 25px;
}
@ -1639,20 +1648,23 @@ div.action-links,
height: 0;
}
.tablenav-pages .pagination-links .paging-input {
.tablenav-pages .pagination-links {
font-size: 16px;
}
.tablenav-pages .pagination-links a,
.tablenav-pages-navspan {
padding: 9px 16px 12px;
font-size: 18px;
}
.tablenav-pages .pagination-links a {
padding: 8px 20px 11px;
display: inline;
font-size: 18px;
background: rgba(0, 0, 0, 0.05);
.tablenav-pages-navspan {
height: 18px;
}
.tablenav-pages .pagination-links .current-page {
padding: 10px;
font-size: 14px;
padding: 8px 9px 9px;
font-size: 16px;
}
/* WP List Table Adjustments: General */

View File

@ -513,16 +513,24 @@ th.asc a:focus span.sorting-indicator {
}
/* Bulk Actions */
.tablenav-pages a {
.tablenav-pages a,
.tablenav-pages-navspan {
font-weight: 600;
margin-right: 1px;
padding: 0 2px;
}
.tablenav-pages .current-page {
padding-top: 0;
margin: 0 2px 0 0;
padding-bottom: 5px;
font-size: 13px;
text-align: center;
}
.tablenav-pages .next-page {
.tablenav .total-pages {
margin-right: 2px;
}
.tablenav #table-paging {
margin-left: 2px;
}
@ -544,12 +552,10 @@ th.asc a:focus span.sorting-indicator {
.tablenav .tablenav-pages {
float: right;
display: block;
height: 28px;
margin-top: 3px;
cursor: default;
height: 30px;
color: #555;
line-height: 2.5;
font-size: 12px;
}
.tablenav .no-pages,
@ -563,41 +569,43 @@ th.asc a:focus span.sorting-indicator {
padding: 3px 6px;
}
.tablenav .tablenav-pages a {
padding: 0 10px 3px;
background: #eee;
background: rgba( 0, 0, 0, 0.05 );
.tablenav .tablenav-pages a,
.tablenav-pages-navspan {
display: inline-block;
width: 7px;
border: 1px solid #d2d2d2;
padding: 3px 10px 7px;
background: #e4e4e4;
font-size: 16px;
line-height: 1;
font-weight: normal;
line-height: 1.3333;
text-align: center;
}
.tablenav-pages-navspan {
height: 16px;
border-color: #e8e8e8;
background: #ebebeb;
color: #b4b4b4;
}
.tablenav .tablenav-pages a:hover,
.tablenav .tablenav-pages a:focus {
border-color: #5b9dd9;
color: #fff;
background: #00a0d2;
}
.tablenav .tablenav-pages a.disabled,
.tablenav .tablenav-pages a.disabled:hover,
.tablenav .tablenav-pages a.disabled:focus,
.tablenav .tablenav-pages a.disabled:active {
color: #a0a5aa;
background: #eee;
background: rgba( 0, 0, 0, 0.05 );
-webkit-box-shadow: none;
box-shadow: none;
outline: none; /* IE8 */
}
.tablenav .displaying-num {
margin-right: 7px;
color: #777;
font-size: 12px;
font-style: italic;
}
.tablenav .one-page .displaying-num {
display: inline-block;
margin-top: 2px;
margin-top: 5px;
margin-right: 0;
}
@ -637,8 +645,6 @@ classes exist in paginate_links() but not seen in list table output. */
float: right;
margin: 0 5px;
padding-top: 3px;
/* line-height in px same as .tablenav height */
line-height: 30px;
}
.wp-filter .view-switch {
@ -658,6 +664,7 @@ classes exist in paginate_links() but not seen in list table output. */
height: 28px;
text-align: center;
line-height: 24px;
text-decoration: none;
}
.view-switch a:before {
@ -1616,12 +1623,14 @@ div.action-links,
.tablenav.bottom .displaying-num {
position: absolute;
right: 0;
top: 10px;
top: 11px;
margin: 0;
font-size: 14px;
}
.tablenav-pages {
.tablenav .tablenav-pages {
width: 100%;
height: auto;
text-align: center;
margin: 0 0 25px;
}
@ -1639,20 +1648,23 @@ div.action-links,
height: 0;
}
.tablenav-pages .pagination-links .paging-input {
.tablenav-pages .pagination-links {
font-size: 16px;
}
.tablenav-pages .pagination-links a,
.tablenav-pages-navspan {
padding: 9px 16px 12px;
font-size: 18px;
}
.tablenav-pages .pagination-links a {
padding: 8px 20px 11px;
display: inline;
font-size: 18px;
background: rgba(0, 0, 0, 0.05);
.tablenav-pages-navspan {
height: 18px;
}
.tablenav-pages .pagination-links .current-page {
padding: 10px;
font-size: 14px;
padding: 8px 9px 9px;
font-size: 16px;
}
/* WP List Table Adjustments: General */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -704,30 +704,46 @@ class WP_List_Table {
$total_pages_before = '<span class="paging-input">';
$total_pages_after = '</span>';
$disable_first = $disable_last = '';
if ( $current == 1 ) {
$disable_first = ' disabled';
}
if ( $current == $total_pages ) {
$disable_last = ' disabled';
}
$page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
'first-page' . $disable_first,
esc_url( remove_query_arg( 'paged', $current_url ) ),
__( 'First page' ),
'&laquo;'
);
$disable_first = $disable_last = $disable_prev = $disable_next = false;
$page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
'prev-page' . $disable_first,
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
__( 'Previous page' ),
'&lsaquo;'
);
if ( $current == 1 ) {
$disable_first = true;
$disable_prev = true;
}
if ( $current == 2 ) {
$disable_first = true;
}
if ( $current == $total_pages ) {
$disable_last = true;
$disable_next = true;
}
if ( $current == $total_pages - 1 ) {
$disable_last = true;
}
if ( $disable_first ) {
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
} else {
$page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
esc_url( remove_query_arg( 'paged', $current_url ) ),
__( 'First page' ),
'&laquo;'
);
}
if ( $disable_prev ) {
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
} else {
$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
__( 'Previous page' ),
'&lsaquo;'
);
}
if ( 'bottom' == $which ) {
$html_current_page = $current;
$total_pages_before = '<span id="table-paging" class="paging-input">';
$total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">';
} else {
$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' />",
'<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
@ -738,19 +754,25 @@ class WP_List_Table {
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
$page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
'next-page' . $disable_last,
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
__( 'Next page' ),
'&rsaquo;'
);
if ( $disable_next ) {
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
} else {
$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
__( 'Next page' ),
'&rsaquo;'
);
}
$page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
'last-page' . $disable_last,
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
__( 'Last page' ),
'&raquo;'
);
if ( $disable_last ) {
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
} else {
$page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
__( 'Last page' ),
'&raquo;'
);
}
$pagination_links_class = 'pagination-links';
if ( ! empty( $infinite_scroll ) ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32947';
$wp_version = '4.3-alpha-32948';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.