Add a JavaScript view for showing modal dialogs.

Review Request #6305 — Created Sept. 9, 2014 and submitted

Information

Review Board
release-2.0.x
3d894f9...

Reviewers

RB.DialogView is a wrapper around $.modalBox() that makes it easy to
construct, show, and hide modal dialogs. It can be instantiated and
bound to an element to show the contents of that element as a dialog, or
it can be subclassed to allow another view to act as a dialog.

Used this in a couple other changes I've been working on. Had it here
a while and decided to just pull it out and submit it.

Unit tests pass. Note that I didn't add unit tests for actually showing
the dialog, since it's a modal dialog that updates document.body, and
thus couldn't easily be sandboxed.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/rb/js/ui/views/dialogView.js
        reviewboard/static/rb/js/ui/views/tests/dialogViewTests.js
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/rb/js/ui/views/dialogView.js
        reviewboard/static/rb/js/ui/views/tests/dialogViewTests.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (8cc50d8)