var response_commands = {\r
- update_post_score: function(type, id, inc) {\r
- var $score_board = $('#' + type + '-' + id + '-score');\r
+ update_post_score: function(id, inc) {\r
+ var $score_board = $('#post-' + id + '-score');\r
$score_board.html(parseInt($score_board.html()) + inc)\r
},\r
\r
- update_user_post_vote: function(type, id, vote_type) {\r
- var $upvote_button = $('#' + type + '-' + id + '-upvote');\r
- var $downvote_button = $('#' + type + '-' + id + '-downvote');\r
+ update_user_post_vote: function(id, vote_type) {\r
+ var $upvote_button = $('#post-' + id + '-upvote');\r
+ var $downvote_button = $('#post-' + id + '-downvote');\r
\r
$upvote_button.removeClass('on');\r
$downvote_button.removeClass('on');\r
});\r
},\r
\r
- insert_comment: function(post_type, post_id, comment_id, comment, username, profile_url, delete_url) {\r
- var $container = $('#comments-container-' + post_type + '-' + post_id);\r
- var skeleton = $('#new-comment-skeleton-' + post_type + '-' + post_id).html().toString();\r
+ insert_comment: function(post_id, comment_id, comment, username, profile_url, delete_url) {\r
+ var $container = $('#comments-container-' + post_id);\r
+ var skeleton = $('#new-comment-skeleton-' + post_id).html().toString();\r
\r
skeleton = skeleton.replace(new RegExp('%ID%', 'g'), comment_id)\r
.replace(new RegExp('%COMMENT%', 'g'), comment)\r