Allow comments to be deleted from review dialog

Review Request #7744 — Created Oct. 28, 2015 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

The review dialog now displays a delete icon next to all deletable
comments (diff comments and attachment comments, currently). Previously,
the only way to delete a comment was to delete it from the review UI
where it was created. However, with general comments coming soon, there
was no review UI to manage them and delete them. Hence, it makes sense
for all deletable comments to be deletable from within the review
dialog.

JS Unit tests have been added for deletion of diff comments, attachment
comments, and screenshot comments.

This patch also contains some minor JS cleanups:
- RB.BaseResourceModel.ready now ensures its success and error
options are functions before bdinging them.
- Replaced a binding of self = this and calling a function by binding
said function to the correct context.
- Cleaned up some assignments in RB.BaseResourceModel._finishDestroy
so that it only does one set() call instead of several.

  • Ran JS tests.
  • Deleted attachment comments and diff comments from the review dialog.
    It worked as expected.
  • Manually verified that the deletion confirmation works in both cases.