Fix inter-page navigating on Edit Comments screen when using keyboard shortcuts. props garyc40. see #16262

git-svn-id: https://develop.svn.wordpress.org/trunk@17343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2011-01-21 20:28:41 +00:00
parent 04f552b7d5
commit 19b385450e
4 changed files with 5 additions and 3 deletions

View File

@ -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();

View File

@ -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

View File

@ -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']),