$column_display_name) {
$class = "class=\"$column_name column-$column_name quick-edit-div\"";
@@ -1267,7 +1264,6 @@ function _post_row($a_post, $pending_comments, $mode) {
$actions = array();
if ( current_user_can('edit_post', $post->ID) ) {
$actions['edit'] = '' . __('Edit') . '';
- $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . '';
$actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "";
}
if ( in_array($post->post_status, array('pending', 'draft')) )
@@ -1447,7 +1443,6 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
' . __('Edit') . '';
- $actions['inline'] = '' . __('Quick Edit') . '';
$actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "";
if ( in_array($post->post_status, array('pending', 'draft')) )
$actions['view'] = '' . __('Preview') . '';
@@ -1893,7 +1888,6 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
$actions['spam'] = "';
$actions['delete'] = "';
$actions['edit'] = "". __('Edit') . '';
- $actions['quickedit'] = '' . __('Quick Edit') . '';
if ( 'spam' != $the_comment_status )
$actions['reply'] = '' . __('Reply') . '';
diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js
index 0edd828984..701d942904 100644
--- a/wp-admin/js/edit-comments.js
+++ b/wp-admin/js/edit-comments.js
@@ -107,24 +107,25 @@ commentReply = {
addEvents : function(r) {
r.each(function() {
$(this).dblclick(function(){
- commentReply.toggle(this);
+ commentReply.toggle_edit(this);
});
});
},
- toggle : function(el) {
- if ( $(el).css('display') != 'none' )
- $(el).find('a.vim-q').click();
+ toggle_edit : function(el) {
+ if ( $(el).css('display') != 'none' ) {
+ var id = $(el).attr('id').substr(8);
+ if (id) this.open(id, '', 'edit');
+ }
},
revert : function() {
- if ( $('#the-comment-list #replyrow').length < 1 )
- return false;
-
- $('#replyrow').fadeOut('fast', function(){
- commentReply.close();
- });
+ if ( $('#the-comment-list #replyrow').length > 0 ) {
+ $('#replyrow').fadeOut('fast', function(){
+ commentReply.close();
+ });
+ }
return false;
},
@@ -144,7 +145,10 @@ commentReply = {
open : function(id, p, a) {
var t = this;
- t.close();
+
+ if ( $('#the-comment-list #replyrow').length > 0 )
+ t.close();
+
t.o = '#comment-'+id;
$('#replyrow td').attr('colspan', $('.widefat tfoot th:visible').length);
@@ -314,7 +318,7 @@ $(document).ready(function(){
$('form#comments-form')[0].submit();
}
};
- $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment],
+ $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', ['e', edit_comment],
['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')],
['shift+d', make_bulk('delete')], ['shift+x', toggle_all]],
{highlight_first: adminCommentsL10n.hotkeys_highlight_first, highlight_last: adminCommentsL10n.hotkeys_highlight_last,
diff --git a/wp-admin/js/inline-edit-post.js b/wp-admin/js/inline-edit-post.js
index 403d5f5156..a9a06b3e17 100644
--- a/wp-admin/js/inline-edit-post.js
+++ b/wp-admin/js/inline-edit-post.js
@@ -26,7 +26,6 @@ inlineEditPost = {
// add events
t.rows.dblclick(function() { inlineEditPost.toggle(this); });
- t.addEvents(t.rows);
$('#bulk-title-div').after(
$('#inline-edit div.categories').clone(),
@@ -79,14 +78,6 @@ inlineEditPost = {
$(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
},
- addEvents : function(r) {
- r.each(function() {
- var row = $(this);
- $('a.editinline', row).click(function() { inlineEditPost.edit(this); return false; });
- row.attr('title', inlineEditL10n.edit);
- });
- },
-
setBulk : function() {
var te = '', c = '';
this.revert();
@@ -98,7 +89,7 @@ inlineEditPost = {
if ( $(this).attr('checked') ) {
var id = $(this).val();
c = c == '' ? ' class="alternate"' : '';
- te += 'X'+$('#inline_'+id+' .post_title').text()+' ';
+ te += 'X'+$('#inline_'+id+' .post_title').text()+' ';
}
});
@@ -208,7 +199,6 @@ inlineEditPost = {
row.html($(r).html()).show()
.animate( { backgroundColor: '#CCEEBB' }, 500)
.animate( { backgroundColor: '#eefee7' }, 500);
- inlineEditPost.addEvents(row);
} else {
$('#edit-'+id+' .quick-edit-save').append(''+inlineEditL10n.error+'');
}
diff --git a/wp-admin/js/inline-edit-tax.js b/wp-admin/js/inline-edit-tax.js
index 1c9d048f10..ed102bbdd0 100644
--- a/wp-admin/js/inline-edit-tax.js
+++ b/wp-admin/js/inline-edit-tax.js
@@ -20,7 +20,6 @@ inlineEditTax = {
// add events
t.rows.dblclick(function() { inlineEditTax.toggle(this); });
- t.addEvents(t.rows);
$('#doaction, #doaction2, #post-query-submit').click(function(e){
if ( $('form#posts-filter tr.inline-editor').length > 0 )
@@ -34,14 +33,6 @@ inlineEditTax = {
$(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
},
- addEvents : function(r) {
- r.each(function() {
- var row = $(this);
- $('a.editinline', row).click(function() { inlineEditTax.edit(this); return false; });
- row.attr('title', inlineEditL10n.edit);
- });
- },
-
edit : function(id) {
var t = this;
t.revert();
@@ -112,7 +103,6 @@ inlineEditTax = {
row.html($(r).html()).show()
.animate( { backgroundColor: '#CCEEBB' }, 500)
.animate( { backgroundColor: '#eefee7' }, 500);
- inlineEditTax.addEvents(row);
} else
$('#edit-'+id+' .quick-edit-save .error').html(r).show();
} else
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 22229ccbae..a21c56ccef 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -158,7 +158,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'), '20081007' );
+ $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081014' );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'pending' => __('%i% pending'), // must look like: "# blah blah"
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
@@ -244,15 +244,14 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
- $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081007' );
+ $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081014' );
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
- 'edit' => __('Double-click to edit'),
- 'error' => __('Error while saving the changes.')
+ 'error' => __('Error while saving the changes.'),
+ 'rem_title' => __('Remove from batch edit')
) );
- $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081007' );
+ $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081014' );
$scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
- 'edit' => __('Double-click to edit'),
'error' => __('Error while saving the changes.')
) );
|