Use DraftResource.publish from the review dialog.

Review Request #7424 — Created June 13, 2015 and submitted

Information

Review Board
release-2.0.x
ee53a2a...

Reviewers

The review dialog wasn't using the publish method to publish reviews, which
would still publish but would skip emitting the publishing and published
events. This made it hard to do things from extensions that relied on those
events.

I've also fixed up an incorrect comment and removed an unused var definition.

Used this from an extension and saw that the publishing event was successfully
triggered.

Description From Last Updated

Since this is all pretty much the same except for the function call, maybe we can pre-compute which function we …

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/static/rb/js/views/reviewDialogView.js (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Since this is all pretty much the same except for the function call, maybe we can pre-compute which function we want to call to a variable and then call that?

  3. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/extensions/models/reviewDraftBannerHookModel.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/extensions/models/reviewDraftBannerHookModel.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/reviewDialogView.js
        reviewboard/static/rb/js/resources/models/draftReviewModel.js
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (d610d2d)