From 3f9bb9bdaddb71934d0e3fdbdde2b60aa964fdba Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 5 Feb 2014 02:15:55 -0500 Subject: [PATCH] VRFS-1020 share dialog work --- web/app/assets/javascripts/web/sessions.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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..."); }); }