Update all replies of a Sone, too.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 3 Jan 2011 18:32:01 +0000 (19:32 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 3 Jan 2011 18:32:01 +0000 (19:32 +0100)
src/main/resources/static/javascript/sone.js

index 09c0bb0..58917c9 100644 (file)
@@ -460,6 +460,13 @@ function updateTrustControls(soneId, trustValue) {
                        getPostElement(this).find(".post-untrust").toggleClass("hidden", trustValue == null);
                }
        });
+       $(this).find("#sone .reply").each(function() {
+               if (getReplyAuthor(this) == soneId) {
+                       getReplyElement(this).find(".reply-trust").toggleClass("hidden", trustValue != null);
+                       getReplyElement(this).find(".reply-distrust").toggleClass("hidden", (trustValue != null) && (trustValue < 0));
+                       getReplyElement(this).find(".reply-untrust").toggleClass("hidden", trustValue == null);
+               }
+       });
 }
 
 function updateReplyLikes(replyId) {