Fix a couple small errors in the Retina avatar support.

Review Request #8035 — Created March 7, 2016 and submitted

Information

Djblets
release-0.10.x

Reviewers

The new support for Retina avatars was assuming the existence of a
"srcset" attribute on images, and failing with a JavaScript error if not
set. The error then bubbled up, impacted any callers, breaking them in
the process. We now assume a default of an empty srcset, falling back on
just using src.

It also failed to return the current element set, preventing chaining
from working. We now just return 'this' at the end.

Encountered the errors when using the RB reply UI. This change fixed them.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.retina.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.retina.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (5ba6e13)
Loading...