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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-20 15:26:44 +00:00
parent 65f14e4fd3
commit 60a828c31f
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']),