Add support for raw text fields and text types in JS resource models.

Review Request #6461 — Created Oct. 18, 2014 and submitted

Information

Review Board
release-2.0.x
b34dd90...

Reviewers

Several JS resource models now have support for fetching raw text fields
and storing them as attributes on the model. This will be used by
Markdown editors to load the raw text for editing while using HTML or
Markdown-escaped for display.

The models can now have includeRawTextFields set to trigger the storage
of the raw fields, which will be stored as the rawTextFields attribute.

Along with this, we now always set the richText fields based on the raw
values, and not the forced values, since we only care about the former.

On top of this, there's also a bug fix for allowing the values in extraQueryArgs
to be overridden for requests.

Unit tests pass.

Tested this along with some upcoming changes and saw that the parameters
were being passed in all cases I cared about, and the correct results
came in.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/resources/models/tests/draftReviewRequestModelTests.js
        reviewboard/static/rb/js/resources/models/reviewReplyModel.js
        reviewboard/static/rb/js/resources/models/tests/reviewReplyModelTests.js
        reviewboard/static/rb/js/resources/models/draftResourceModelMixin.js
        reviewboard/static/rb/js/resources/models/baseResourceModel.js
        reviewboard/static/rb/js/resources/models/baseCommentModel.js
        reviewboard/static/rb/js/resources/models/draftReviewRequestModel.js
        reviewboard/static/rb/js/resources/models/tests/reviewModelTests.js
        reviewboard/static/rb/js/resources/models/reviewRequestModel.js
        reviewboard/static/rb/js/resources/models/baseCommentReplyModel.js
        reviewboard/static/rb/js/resources/models/reviewModel.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/resources/models/tests/draftReviewRequestModelTests.js
        reviewboard/static/rb/js/resources/models/reviewReplyModel.js
        reviewboard/static/rb/js/resources/models/tests/reviewReplyModelTests.js
        reviewboard/static/rb/js/resources/models/draftResourceModelMixin.js
        reviewboard/static/rb/js/resources/models/baseResourceModel.js
        reviewboard/static/rb/js/resources/models/baseCommentModel.js
        reviewboard/static/rb/js/resources/models/draftReviewRequestModel.js
        reviewboard/static/rb/js/resources/models/tests/reviewModelTests.js
        reviewboard/static/rb/js/resources/models/reviewRequestModel.js
        reviewboard/static/rb/js/resources/models/baseCommentReplyModel.js
        reviewboard/static/rb/js/resources/models/reviewModel.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to markdown-redesign (998787b)
Loading...