alert('ok');\r
},\r
\r
- insert_comment: function(post_id, comment_id, comment, username, profile_url, delete_url, edit_url, convert_url, can_convert) {\r
+ insert_comment: function(post_id, comment_id, comment, username, profile_url, delete_url, edit_url, convert_url, can_convert, show_latest_comments_first) {\r
var $container = $('#comments-container-' + post_id);\r
var skeleton = $('#new-comment-skeleton-' + post_id).html().toString();\r
\r
.replace(new RegExp('%DELETE_URL%', 'g'), delete_url)\r
.replace(new RegExp('%EDIT_URL%', 'g'), edit_url)\r
.replace(new RegExp('%CONVERT_URL%', 'g'), convert_url);\r
-\r
- $container.prepend(skeleton);\r
+ if (show_latest_comments_first) {\r
+ $container.prepend(skeleton);\r
+ } else {\r
+ $container.append(skeleton);\r
+ }\r
\r
// Show the convert comment to answer tool only if the current comment can be converted\r
if (can_convert == true) {\r
reverse('node_markdown', kwargs={'id': comment.id}),
reverse('convert_comment', kwargs={'id': comment.id}),
user.can_convert_comment_to_answer(comment),
+ bool(settings.SHOW_LATEST_COMMENTS_FIRST)
]
}
}