Permalink
Browse files

Multiple comments on a single line can now close. Fixes issue #2

  • Loading branch information...
1 parent 4c2a27b commit 8a2789bdcdf2fc09e15c92ea4eba760a15274d32 Anirudh Sanjeev committed Feb 7, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 static/comments.js
View
@@ -194,12 +194,12 @@ function commentFormAtDiv(element, content)
appendDivToDiffLine(element.id, commentFormDiv);
// Find the submit button and hook to the click event
- $($(element).find('button')[0]).bind('click', {commentDiv:commentFormDiv}, postCommentFromForm);
+ $($(commentFormDiv).find('button')[0]).bind('click', {commentDiv:commentFormDiv}, postCommentFromForm);
// Cancel button
- $($(element).find('button')[1]).bind('click', {commentDiv:commentFormDiv}, function()
+ $($(commentFormDiv).find('button')[1]).bind('click', {commentDiv:commentFormDiv}, function(e)
{
- $(commentFormDiv).hide();
+ $(e.data.commentDiv).hide();
});
// Force the double click thingy to activate on the comment form as

0 comments on commit 8a2789b

Please sign in to comment.