# HG changeset patch # User Brian Neal # Date 1271014873 0 # Node ID 7d3e5aca095f602e67bd290d0de65bbb356870df # Parent 217119c87a06a00acde183040df4d45685ad8fb6 Fixing #73: comments no longer getting adding to web page on submit. diff -r 217119c87a06 -r 7d3e5aca095f gpp/templates/comments/comment_list.html --- a/gpp/templates/comments/comment_list.html Sun Apr 11 18:56:30 2010 +0000 +++ b/gpp/templates/comments/comment_list.html Sun Apr 11 19:41:13 2010 +0000 @@ -1,3 +1,5 @@ +
{% for comment in comments %} {% include 'comments/comment.html' %} {% endfor %} +
diff -r 217119c87a06 -r 7d3e5aca095f media/js/comments.js --- a/media/js/comments.js Sun Apr 11 18:56:30 2010 +0000 +++ b/media/js/comments.js Sun Apr 11 19:41:13 2010 +0000 @@ -19,10 +19,12 @@ dataType: 'html', success: function (data, textStatus) { postText.val(''); - $('#comment-list').append(data); - var lastLi = $('#comment-list > li:last'); - lastLi.hide(); - lastLi.fadeIn(3000); + $('#comment-container').append(data); + var newDiv = $('#comment-container > div:last'); + newDiv.hide(); + var num = $('.comment-list', newDiv); + num.html($('#comment-container > div').size() + "."); + newDiv.fadeIn(3000); postButton.removeAttr('disabled').val('Post Comment'); var count = $('#comment-count'); if (count.length) {