Fix cancelling of new diff comments.

Review Request #4037 — Created April 11, 2013 and submitted

Information

Review Board
master

Reviewers

Fix cancelling of new diff comments.

Cancelling new diff comments was broken due to some of the earlier re-jiggering
of the destroy() callbacks. In the case of new diff comments when we don't have
a Review object, we were triggering the error callback instead of actually
destroying the object. I've fixed this case and added a big comment.

While I was doing this, I noticed that CommentEditor._updateFromComment was
being triggered during the cancel operation. I've made it remove that event
binding.
- Checked that cancelling the addition of a new diff comment with no existing
  Review would remove the comment flag.
- Checked that cancelling the addition of a new diff comment with an existing
  Review would remove the comment flag but leave the rest of the Review
  unaffected.
- Checked that cancelling a change to an existing diff comment left the existing
  comment text the same.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/static/rb/js/models/commentEditorModel.js
        reviewboard/static/rb/js/models/baseResourceModel.js
    
    
  2. 
      
SM
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (eb63dcb).
Loading...