summaryrefslogtreecommitdiffstats
path: root/wp-admin/edit-comments.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/edit-comments.js')
-rw-r--r--wp-admin/edit-comments.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/wp-admin/edit-comments.js b/wp-admin/edit-comments.js
new file mode 100644
index 0000000..4dfe755
--- /dev/null
+++ b/wp-admin/edit-comments.js
@@ -0,0 +1,23 @@
+addLoadEvent(function() {
+ theCommentList = new listMan('the-comment-list');
+ if ( !theCommentList )
+ return false;
+ theCommentList.dimComplete = function(what,id,dimClass) {
+ var m = document.getElementById('awaitmod');
+ if ( document.getElementById(what + '-' + id).className.match(dimClass) ) m.innerHTML = parseInt(m.innerHTML,10) + 1;
+ else m.innerHTML = parseInt(m.innerHTML,10) - 1;
+ }
+ theCommentList.delComplete = function(what,id) {
+ var m = document.getElementById('awaitmod');
+ if ( document.getElementById(what + '-' + id).className.match('unapproved') ) m.innerHTML = parseInt(m.innerHTML,10) - 1;
+ }
+ if ( theList ) // the post list: edit.php
+ theList.delComplete = function() {
+ var comments = document.getElementById('comments');
+ var commdel = encloseFunc(function(a){a.parentNode.removeChild(a);},comments);
+ var listdel = encloseFunc(function(a){a.parentNode.removeChild(a);},theCommentList.theList);
+ setTimeout(commdel,705);
+ setTimeout(listdel,705);
+ }
+});
+