From: David ‘Bombe’ Roden Date: Mon, 3 Jan 2011 06:27:24 +0000 (+0100) Subject: Convert trust controls to javascript functions. X-Git-Tag: 0.4^2~8^2~15 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=a71b6e40fe24fd8d2e1e0c6f449ddd82d6d831b3 Convert trust controls to javascript functions. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 58fbf95..09c0bb0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -569,6 +569,20 @@ function ajaxifyPost(postElement) { return false; }); + /* convert trust control buttons to javascript functions. */ + $(postElement).find(".post-trust").submit(function() { + trustSone(getPostAuthor(this)); + return false; + }); + $(postElement).find(".post-distrust").submit(function() { + distrustSone(getPostAuthor(this)); + return false; + }); + $(postElement).find(".post-untrust").submit(function() { + untrustSone(getPostAuthor(this)); + return false; + }); + /* add “comment” link. */ addCommentLink(getPostId(postElement), postElement, $(postElement).find(".post-status-line .time"));