$("#sone .post").each(function() {
if (getPostAuthor(this) == soneId) {
getPostElement(this).find(".post-trust").toggleClass("hidden", trustValue != null);
- getPostElement(this).find(".post-distrust").toggleClass("hidden", (trustValue != null) && (trustValue < 0));
+ getPostElement(this).find(".post-distrust").toggleClass("hidden", trustValue != null);
getPostElement(this).find(".post-untrust").toggleClass("hidden", trustValue == null);
}
});
$("#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-distrust").toggleClass("hidden", trustValue != null);
getReplyElement(this).find(".reply-untrust").toggleClass("hidden", trustValue == null);
}
});
<input type="hidden" name="sone" value="<% post.sone.id|html>" />
<button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
</form>
- <form class="distrust post-distrust" action="distrust.html" method="post">
+ <form class="distrust post-distrust<%if post.sone.trust.assigned> hidden<%/if>" action="distrust.html" method="post">
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<input type="hidden" name="returnPage" value="<% request.uri|html>" />
<input type="hidden" name="sone" value="<% post.sone.id|html>" />
<input type="hidden" name="sone" value="<% reply.sone.id|html>" />
<button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
</form>
- <form class="distrust reply-distrust" action="distrust.html" method="post">
+ <form class="distrust reply-distrust<%if reply.sone.trust.assigned> hidden<%/if>" action="distrust.html" method="post">
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<input type="hidden" name="returnPage" value="<% request.uri|html>" />
<input type="hidden" name="sone" value="<% reply.sone.id|html>" />