Fix QE and Reply actions on comments that come in via infinite comment stream

git-svn-id: http://svn.automattic.com/wordpress/trunk@9868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-25 02:41:54 +00:00
parent 1f84059485
commit e05cff11ea
4 changed files with 5 additions and 8 deletions

View File

@ -465,7 +465,7 @@ case 'add-comment' :
foreach ( (array) $comments as $comment ) {
get_comment( $comment );
ob_start();
_wp_comment_row( $comment->comment_ID, $mode, $status );
_wp_comment_row( $comment->comment_ID, $mode, $status, true, true );
$comment_list_item = ob_get_contents();
ob_end_clean();
$x->add( array(

View File

@ -1917,7 +1917,7 @@ function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0
* @param unknown_type $comment_status
* @param unknown_type $checkbox
*/
function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true ) {
function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $from_ajax = false ) {
global $comment, $post;
$comment = get_comment( $comment_id );
$post = get_post($comment->comment_post_ID);
@ -2007,8 +2007,8 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
++$i;
( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
// Reply and quickedit need a hide-if-no-js span
if ( 'reply' == $action || 'quickedit' == $action )
// Reply and quickedit need a hide-if-no-js span when not added with ajax
if ( ('reply' == $action || 'quickedit' == $action) && ! $from_ajax )
$action .= ' hide-if-no-js';
echo "<span class='$action'>$sep$link</span>";

View File

@ -81,9 +81,6 @@ $(document).ready(function(){
commentReply = {
init : function() {
this.rows = $('#the-comment-list tr');
if ( !this.rows.size() )
this.rows = $('#the-comment-list > div.comment-item');
var row = $('#replyrow');
$('a.cancel', row).click(function() { return commentReply.revert(); });

View File

@ -156,7 +156,7 @@ function wp_default_scripts( &$scripts ) {
'good' => _c('Medium|password strength'),
'strong' => __('Strong')
) );
$scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081117' );
$scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081124' );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last'])