efa9c7 Make the cancel button work on both regular comments and inline comments

1 file Authored by Pierre-Yves Chibon 7 years ago , Committed by rahul Bajaj 7 years ago ,
    Make the cancel button work on both regular comments and inline comments
    
    The trick to make the same method work with both types of comments is in
    the html structures.
    Regular comments have a section "add_comment" containing a form
    .pr_comment_form. So what we want to do there is finding the closest
    section from the button called, and within that section we want to show
    some parts we hide (when editing a regular comment) and make the form
    disappear.
    Inline comments have the section "add_comment" within the form
    .pr_comment_form.
    
    So when we find the closest section, if there is no .pr_comment_form in
    them, we know we're called on an inline comment.
    This means, we can then find the closest .pr_comment_form from the button
    clicked, get its parent (the  tag, ie: the line in the html table)
    and remove that entire line.