Fix placeholder issues when removing comments. props garyc40, fixes #15879.

git-svn-id: https://develop.svn.wordpress.org/trunk@17081 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-12-20 15:26:44 +00:00
parent 3df8f3d4a5
commit ed9ce46089
4 changed files with 9 additions and 3 deletions

View File

@ -844,7 +844,11 @@ class WP_List_Table {
extract( $this->_pagination_args );
ob_start();
$this->display_rows_or_placeholder();
if ( ! empty( $_REQUEST['no_placeholder'] ) )
$this->display_rows();
else
$this->display_rows_or_placeholder();
$rows = ob_get_clean();
$response = array( 'rows' => $rows );

View File

@ -228,6 +228,8 @@ setCommentsList = function() {
args.offset = per_page - 1; // fetch only the last item of the next page
}
args.no_placeholder = true;
args.paged ++;
listTable.fetch_list(args, function(response) {

File diff suppressed because one or more lines are too long

View File

@ -313,7 +313,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(listTableL10n);}catch(e){};'
) );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101219' );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101220' );
$scripts->add_data( 'admin-comments', 'group', 1 );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),