Move the CommentBarIssueView creation code into ReviewBoxView.

Review Request #4381 — Created Aug. 2, 2013 and submitted

Information

Review Board
master

Reviewers

Move the CommentBarIssueView creation code into ReviewBoxView.

The code to create a CommentBarIssueView was being done inside the
template for the page, adding more script tags and more document.ready
calls.

This code is now created when rendering the ReviewBoxView. It creates
based on data attributes now stored on the element. It's part of an
effort to remove <script> tags in the templates, which will help with
the require.js migration.
Tested loading comments without issues, and comments with. That's with
and without a logged in user.

Tested changing issue state.
Description From Last Updated

So {{interactive}} is theoretically a boolean, but what we get from .data is a string. Can you convert explicitly?

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/templates/reviews/review_detail.html
        reviewboard/static/rb/css/reviews.less
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      Ignored Files:
        reviewboard/templates/reviews/review_detail.html
        reviewboard/static/rb/css/reviews.less
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. 
      
david
  1. 
      
  2. Show all issues
    So {{interactive}} is theoretically a boolean, but what we get from .data is a string. Can you convert explicitly?
    1. jQuery is smart and does this for us. It also converts "123" to 123.
      
      (I actually forgot at first and did a comparison against "true", and it was broken.)
  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed