Move the diff viewer whitespace toggles into the new objects.

Review Request #4293 — Created July 5, 2013 and submitted

Information

Review Board
master

Reviewers

Move the diff viewer whitespace toggles into the new objects.

The Show Whitespace Changes and Show Extra Whitespace toggles now live
in the new objects and interact with the DiffReviewableViews to change
the state.

The cookie management now lives in UserSession. Callers just need to set
an attribute and it will update the cookie. This change introduces
jquery.cookie for actually setting and getting cookies, because
JavaScript's native cookie support is terrible.
Tested the toggles manually.

Tested that the cookies were loaded and saved properly.

Unit tests pass.
Description From Last Updated

You can drop the space between %> and loaded, since there's a lot of whitespace at the start of this …

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/lib/js/jquery.cookie-1.3.1.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/tests/diffReviewableViewTests.js
        reviewboard/static/rb/js/models/tests/userSessionModelTests.js
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/diffviewer.js
        reviewboard/static/rb/js/models/userSessionModel.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/lib/js/jquery.cookie-1.3.1.js
        reviewboard/templates/diffviewer/diff_file_fragment.html
        reviewboard/static/rb/js/diffviewer/views/tests/diffReviewableViewTests.js
        reviewboard/static/rb/js/models/tests/userSessionModelTests.js
        reviewboard/templates/diffviewer/view_diff.html
        reviewboard/static/rb/js/diffviewer/views/diffReviewableView.js
        reviewboard/static/rb/js/diffviewer.js
        reviewboard/static/rb/js/models/userSessionModel.js
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
  2. 
      
david
  1. 
      
  2. Show all issues
    You can drop the space between %> and loaded, since there's a lot of whitespace at the start of this line.
  3. 
      
chipx86
Review request changed
Status:
Completed