From: David ‘Bombe’ Roden Date: Thu, 25 Nov 2010 12:01:12 +0000 (+0100) Subject: Use function to load a reply after posting a reply. X-Git-Tag: 0.3.1-RC1~17 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=faa26c42ce692d20bd5c22c3e1797729d7dea9e1 Use function to load a reply after posting a reply. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 133e1d4..8a64118 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -453,11 +453,8 @@ function ajaxifyPost(postElement) { $(inputField).val(""); postReply(postId, text, function(success, error, replyId) { if (success) { - getReply(replyId, function(soneId, soneName, replyTime, replyDisplayTime, text, html) { - newReply = $(html).insertBefore("#sone .post#" + postId + " .create-reply"); - $("#sone .post#" + postId + " .create-reply").addClass("hidden"); - ajaxifyReply(newReply); - }); + loadNewReply(replyId); + $("#sone .post#" + postId + " .create-reply").addClass("hidden"); } else { alert(error); }