mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-07 10:40:11 +00:00
Trash status updates for posts, pages, comments and attachments, props caesarsgrunt, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -38,9 +38,6 @@ setCommentsList = function() {
|
||||
settings.data._page = pageInput.val();
|
||||
settings.data._url = document.location.href;
|
||||
|
||||
if ( 'undefined' != showNotice && settings.data.action && settings.data.action == 'delete-comment' && settings.data.deleted)
|
||||
return showNotice.warn() ? settings : false;
|
||||
|
||||
return settings;
|
||||
};
|
||||
|
||||
@@ -101,17 +98,15 @@ setCommentsList = function() {
|
||||
a.html(n);
|
||||
});
|
||||
|
||||
$('span.deleted-count').each( function() {
|
||||
$('span.trash-count').each( function() {
|
||||
var a = $(this), n;
|
||||
n = a.html().replace(/[ ,.]+/g, '');
|
||||
n = parseInt(n,10);
|
||||
if ( isNaN(n) ) return;
|
||||
if ( $(settings.target).parents( 'span.delete' ).size() && $('#' + settings.element).is('.deleted,.spam') ) { // we destroyed a deleted or spam comment
|
||||
n--;
|
||||
} else if ( $(settings.target).parents( 'span.delete' ).size() ) { // we deleted a comment
|
||||
n++;
|
||||
} else if ( $('#' + settings.element).is('.deleted') ) { // we approved or spammed a deleted comment
|
||||
n--;
|
||||
if ( $(settings.target).parents( 'span.trash' ).size() ) { // we trashed a comment
|
||||
n = n + 1;
|
||||
} else if ( $('#' + settings.element).is('.trash') ) { // we deleted or untrashed a trash comment
|
||||
n = n - 1;
|
||||
}
|
||||
if ( n < 0 ) { n = 0; }
|
||||
n = n.toString();
|
||||
|
||||
Reference in New Issue
Block a user