diff --git a/web/app/assets/javascripts/web/sessions.js b/web/app/assets/javascripts/web/sessions.js index 853af4b20..5d42c899d 100644 --- a/web/app/assets/javascripts/web/sessions.js +++ b/web/app/assets/javascripts/web/sessions.js @@ -19,7 +19,16 @@ rest.addSessionComment(sessionId, JK.currentUserId, comment) .done(function(response) { $("#spnCommentCount").html(parseInt($("#spnCommentCount").text()) + 1); - $(".landing-comment-scroller").prepend(comment); + + var template = $('#template-landing-comment').html(); + var commentHtml = context.JK.fillTemplate(template, { + avatar_url: context.JK.currentUserAvatarUrl, + name: context.JK.currentUserName, + comment: comment + }); + + $(".landing-comment-scroller").prepend(commentHtml); + $("#txtSessionComment").val("Enter a comment..."); }); }