Ticket #6530: 6530.diff
File 6530.diff, 2.6 KB (added by , 14 years ago) |
---|
-
wp-admin/edit-comments.php
14 14 $wp_list_table = get_list_table('WP_Comments_List_Table'); 15 15 $pagenum = $wp_list_table->get_pagenum(); 16 16 17 $parent_file = 'edit-comments.php'; 18 17 19 $doaction = $wp_list_table->current_action(); 18 20 19 21 if ( $doaction ) { -
wp-admin/includes/class-wp-list-table.php
476 476 477 477 $current = $this->get_pagenum(); 478 478 479 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 479 if( defined('DOING_AJAX') && DOING_AJAX ) { 480 $current_url = admin_url( $_GET['list_args']['screen']['parent_file'] ); 481 $current--; 482 } else { 483 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 484 } 480 485 481 486 $page_links = array(); 482 487 … … 851 856 $this->display_rows(); 852 857 else 853 858 $this->display_rows_or_placeholder(); 859 860 $rows = ob_get_contents(); 861 ob_clean(); 862 863 $this->display_tablenav( 'top' ); 864 $top_pagination = ob_get_contents(); 865 ob_clean(); 866 867 $this->display_tablenav( 'bottom' ); 868 $bottom_pagination = ob_get_contents(); 869 870 ob_end_clean(); 854 871 855 $r ows = ob_get_clean();872 $response = array( 'rows' => $rows, 'top_pagination' => $top_pagination, 'bottom_pagination' => $bottom_pagination ); 856 873 857 $response = array( 'rows' => $rows );858 859 874 if ( isset( $total_items ) ) 860 875 $response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ); 861 876 -
wp-admin/js/edit-comments.dev.js
235 235 236 236 listTable.fetch_list(args, function(response) { 237 237 theExtraList.get(0).wpList.add( response.rows ); 238 updatePagination( response.top_pagination, response.bottom_pagination ); 238 239 }); 239 240 }; 241 242 var updatePagination = function( top, bottom ){ 243 $('.tablenav.top').before( top ).remove(); 244 $('.tablenav.bottom').before( bottom ).remove(); 245 } 240 246 241 247 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); 242 248 theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )