mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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')]],
|
||||
|
||||
@@ -26,6 +26,7 @@ inlineEditPost = {
|
||||
|
||||
// add events
|
||||
t.rows.dblclick(function() { inlineEditPost.toggle(this); });
|
||||
t.addEvents(t.rows);
|
||||
|
||||
$('#bulk-title-div').after(
|
||||
$('#inline-edit div.categories').clone(),
|
||||
@@ -78,6 +79,14 @@ 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();
|
||||
@@ -89,7 +98,7 @@ inlineEditPost = {
|
||||
if ( $(this).attr('checked') ) {
|
||||
var id = $(this).val();
|
||||
c = c == '' ? ' class="alternate"' : '';
|
||||
te += '<div'+c+' id="ttle'+id+'"><a id="_'+id+'" title="'+inlineEditL10n.rem_title+'" class="ntdelbutton">X</a>'+$('#inline_'+id+' .post_title').text()+'</div>';
|
||||
te += '<div'+c+' id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton">X</a>'+$('#inline_'+id+' .post_title').text()+'</div>';
|
||||
}
|
||||
});
|
||||
|
||||
@@ -199,6 +208,7 @@ inlineEditPost = {
|
||||
row.html($(r).html()).show()
|
||||
.animate( { backgroundColor: '#CCEEBB' }, 500)
|
||||
.animate( { backgroundColor: '#eefee7' }, 500);
|
||||
inlineEditPost.addEvents(row);
|
||||
} else {
|
||||
$('#edit-'+id+' .quick-edit-save').append('<span class="error">'+inlineEditL10n.error+'</span>');
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ 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 )
|
||||
@@ -33,6 +34,14 @@ 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();
|
||||
@@ -103,6 +112,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user