From 96848c8c63a013f683d83a9e9ba8d1004625db54 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 31 Oct 2008 18:09:42 +0000 Subject: [PATCH] Doubleclick on comment text to open QE git-svn-id: https://develop.svn.wordpress.org/trunk@9437 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/edit-comments.js | 8 +++++--- wp-includes/script-loader.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index 9792b68fb9..7d503ec7c1 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -97,7 +97,9 @@ commentReply = { $('a.save', row).click(function() { return commentReply.send(this); }); // add events - this.addEvents(this.rows); + $('#the-comment-list .column-comment > p').dblclick(function(){ + commentReply.toggle($(this).parent()); + }); $('#doaction, #doaction2, #post-query-submit').click(function(e){ if ( $('#the-comment-list #replyrow').length > 0 ) @@ -108,8 +110,8 @@ commentReply = { addEvents : function(r) { r.each(function() { - $(this).dblclick(function(){ - commentReply.toggle(this); + $(this).find('.column-comment > p').dblclick(function(){ + commentReply.toggle($(this).parent()); }); }); }, diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index b05e82264b..5de5265c31 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -156,7 +156,7 @@ function wp_default_scripts( &$scripts ) { 'good' => __('Medium'), 'strong' => __('Strong') ) ); - $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081016' ); + $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081031' ); $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 'pending' => __('%i% pending'), // must look like: "# blah blah" 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),