Defining a mode for imageAttachmentView

Review Request #7772 — Created Nov. 15, 2015 and submitted

Information

Review Board
master

Reviewers

When rendering the image review view, the div class for the image itself in imageAttachmentView mode currently has name image-diff-null. This is because the base class BaseImageView initializes mode to null but the subclass imageAttachmentView does not define a proper name for it. This can potentially confuse devs, or at the very least, it gives the impression that the class was not extended properly.

This patch fixes the problem by setting the mode to attachment so that the div class will be image-diff-attachment rather than image-diff-null.

Used Inspect Element tool on the browser to ensure that the div class now reads image-diff-attachment.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/imageReviewableView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/imageReviewableView.js
    
    
  2. 
      
CH
brennie
  1. This is a pretty simple patch, but it needs a better change description.

    Please include why this is an issue. You may want to read this guide on writing descriptions.

  2. 
      
CH
brennie
  1. Ship It!
  2. 
      
CH
Review request changed
Status:
Completed
Change Summary:
Pushed to master (3c287d8)