Fix inter-page navigating on Edit Comments screen when using keyboard shortcuts. props garyc40. see #16262
git-svn-id: http://svn.automattic.com/wordpress/trunk@17343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
385ac2ef74
commit
acd8d41b65
|
@ -478,6 +478,8 @@ class WP_List_Table {
|
|||
$current = $this->get_pagenum();
|
||||
|
||||
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
|
||||
$current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
|
||||
|
||||
$page_links = array();
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ $(document).ready(function(){
|
|||
var first_last, l;
|
||||
|
||||
first_last = 'next' == which? 'first' : 'last';
|
||||
l = $('.'+which+'.page-numbers');
|
||||
l = $('.tablenav-pages .'+which+'-page:not(.disabled)');
|
||||
if (l.length)
|
||||
window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -299,7 +299,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' );
|
||||
$scripts->add_data( 'admin-custom-fields', 'group', 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20110118' );
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20110121' );
|
||||
$scripts->add_data( 'admin-comments', 'group', 1 );
|
||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
|
|
Loading…
Reference in New Issue