Fix comment action links after quick editing and reloading of page on enter while quick editing.

git-svn-id: http://svn.automattic.com/wordpress/trunk@10349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-01-13 01:31:19 +00:00
parent 1c9353ad2e
commit 598f966edc
6 changed files with 21 additions and 6 deletions

View File

@ -672,6 +672,7 @@ case 'edit-comment' :
$mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail';
$position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1';
$checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
$comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
if ( get_option('show_avatars') && 'single' != $mode )
add_filter( 'comment_author', 'floated_admin_avatar' );
@ -679,7 +680,7 @@ case 'edit-comment' :
$x = new WP_Ajax_Response();
ob_start();
_wp_comment_row( $comment_id, $mode, true, $checkbox );
_wp_comment_row( $comment_id, $mode, $comments_listing, $checkbox );
$comment_list_item = ob_get_contents();
ob_end_clean();

View File

@ -1287,7 +1287,9 @@ table.diff .diff-addedline ins {
}
/* table vim shortcuts */
.vim-current {
.vim-current,
.vim-current th,
.vim-current td {
background-color: #E4F2FD !important;
}

View File

@ -1287,7 +1287,9 @@ table.diff .diff-addedline ins {
}
/* table vim shortcuts */
.vim-current {
.vim-current,
.vim-current th,
.vim-current td {
background-color: #E4F2FD !important;
}

View File

@ -138,7 +138,14 @@ commentReply = {
var row = $('#replyrow');
$('a.cancel', row).click(function() { return commentReply.revert(); });
$('a.save', row).click(function() { return commentReply.send(this); });
$('a.save', row).click(function() { return commentReply.send(); });
$('input#author, input#author-email, input#author-url', row).keypress(function(e){
if ( e.which == 13 ) {
commentReply.send();
e.preventDefault();
return false;
}
});
// add events
$('#the-comment-list .column-comment > p').dblclick(function(){
@ -149,6 +156,8 @@ commentReply = {
if ( $('#the-comment-list #replyrow').length > 0 )
commentReply.close();
});
this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
},
@ -272,6 +281,7 @@ commentReply = {
post.content = $('#replycontent').val();
post.id = post.comment_post_ID;
post.comments_listing = this.comments_listing;
$.ajax({
type : 'POST',

File diff suppressed because one or more lines are too long

View File

@ -183,7 +183,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(pwsL10n);}catch(e){};'
) );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20090102' );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20090112' );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last'])