Convert RB.Screenshot to Backbone.

Review Request #3947 — Created March 7, 2013 and submitted

Information

Review Board
master

Reviewers

Convert RB.Screenshot to Backbone.

This is a fairly trivial change to migrate the old screenshot object to
Backbone.js. The only tricky part of this is that I had to add an indirection
step to BaseResourceModel to ensure that the parent object is loaded before
calling url(), because if we don't have the parent links, we won't have a URL
for the object.
Tested setting screenshot captions and deleting screenshots. Ran js-tests.
Description From Last Updated

Should extend RB.BaseResource.prototype.defaults.

chipx86chipx86

Should be one statement.

chipx86chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/rb/js/reviews.js
        reviewboard/static/rb/js/datastore.js
        reviewboard/static/rb/js/models/tests/screenshotModelTests.js
        reviewboard/static/rb/js/models/screenshotModel.js
        reviewboard/static/rb/js/models/baseResourceModel.js
    
    
  2. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/rb/js/reviews.js
        reviewboard/static/rb/js/datastore.js
        reviewboard/static/rb/js/models/tests/screenshotModelTests.js
        reviewboard/static/rb/js/models/screenshotModel.js
        reviewboard/static/rb/js/models/baseResourceModel.js
    
    
  2. 
      
chipx86
  1. 
      
  2. Show all issues
    Should extend RB.BaseResource.prototype.defaults.
  3. reviewboard/static/rb/js/models/screenshotModel.js (Diff revision 2)
     
     
     
     
     
     
    Show all issues
    Should be one statement.
  4. reviewboard/static/rb/js/reviews.js (Diff revision 2)
     
     
     
     
     
    Do we want to show this immediately, or when we know we successfully destroyed?
  5. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/rb/js/reviews.js
        reviewboard/static/rb/js/datastore.js
        reviewboard/static/rb/js/models/tests/screenshotModelTests.js
        reviewboard/static/rb/js/models/screenshotModel.js
        reviewboard/static/rb/js/models/baseResourceModel.js
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (95ce7ed). Thanks!