Bring back Quick Edit links

git-svn-id: https://develop.svn.wordpress.org/trunk@9297 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-10-23 16:34:21 +00:00
parent 873a5b075b
commit f308eb1745
5 changed files with 44 additions and 21 deletions
+12 -16
View File
@@ -109,25 +109,24 @@ commentReply = {
addEvents : function(r) {
r.each(function() {
$(this).dblclick(function(){
commentReply.toggle_edit(this);
commentReply.toggle(this);
});
});
},
toggle_edit : function(el) {
if ( $(el).css('display') != 'none' ) {
var id = $(el).attr('id').substr(8);
if (id) this.open(id, '', 'edit');
}
toggle : function(el) {
if ( $(el).css('display') != 'none' )
$(el).find('a.vim-q').click();
},
revert : function() {
if ( $('#the-comment-list #replyrow').length > 0 ) {
$('#replyrow').fadeOut('fast', function(){
commentReply.close();
});
}
if ( $('#the-comment-list #replyrow').length < 1 )
return false;
$('#replyrow').fadeOut('fast', function(){
commentReply.close();
});
return false;
},
@@ -147,10 +146,7 @@ commentReply = {
open : function(id, p, a) {
var t = this;
if ( $('#the-comment-list #replyrow').length > 0 )
t.close();
t.close();
t.o = '#comment-'+id;
$('#replyrow td').attr('colspan', $('.widefat thead th:visible').length);
@@ -320,7 +316,7 @@ $(document).ready(function(){
$('form#comments-form')[0].submit();
}
};
$.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', ['e', edit_comment],
$.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment],
['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')],
['shift+d', make_bulk('delete')], ['shift+x', toggle_all],
['shift+u', make_bulk('unapprove')]],