includes/clientside/static/comments.js
changeset 29 e5484a9e0818
parent 1 fe660c52c48f
child 74 68469a95658d
--- a/includes/clientside/static/comments.js	Wed Jun 27 12:09:02 2007 -0400
+++ b/includes/clientside/static/comments.js	Thu Jun 28 11:13:39 2007 -0400
@@ -309,12 +309,15 @@
   {
     document.getElementById('subject_' + data.id).innerHTML += ' <span style="color: #D84308">(Unapproved)</span>';
   }
-  if ( data.approved )
+  if ( data.approved && ( typeof(data.approve_updated) == 'string' && data.approve_updated == 'yes' ) )
   {
     var appr = ( data.approved == '1' ) ? 'Unapprove' : 'Approve';
     document.getElementById('comment_approve_'+data.id).innerHTML = appr;
+    
+    // Update approval status
     var p = document.getElementById('comment_status');
     var count = p.firstChild.nodeValue.split(' ')[2];
+    
     if ( p.firstChild.nextSibling )
     {
       var span = p.firstChild.nextSibling;