Refactor $.fn.bug_infobox and $.fn.user_infobox to share code.

Review Request #6053 — Created July 3, 2014 and submitted

Information

Review Board
master
8ddbed0...

Reviewers

This is the first step in refactoring the infoboxes to use backbone models and
views. The code for user and bug infoboxes was substantially similar, and
there's no reason why they had to be separate. All of the code is now shared,
and the API entry-points (bug_infobox and user_infobox) just call into the
common method and pass an ID for the infobox element.

Tested that both infoboxes worked as expected.

Description From Last Updated

The usage of yDistance was intentional, to get an offset between the bottom of the element it matches and the …

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/css/common.less
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/css/common.less
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/static/rb/js/common.js (Diff revision 1)
     
     
    Show all issues

    The usage of yDistance was intentional, to get an offset between the bottom of the element it matches and the top of the infobox. yOffset won't do anything in the case where the infobox appears below the link.

  3. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/css/common.less
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/common.js
        reviewboard/static/rb/css/common.less
    
    
  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (fa34530)