• 
      

    Fix error handling in "Upload Diff" and "Add File" dialogs.

    Review Request #6112 — Created July 17, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    7dc5afc...

    Reviewers

    These dialogs are still driven by some pretty ancient javascript code in
    common.js. All the backend code had been changed to use the new resource
    models, but the error handling callback hadn't been updated for the new
    attributes. The result of this was that instead of seeing an error in the form,
    users would just see an endless "Loading..." spinner.

    • Tried to upload a .png file instead of a diff and saw the error shown next to
      the 'diff' field.
    • Tried to submit the 'Add File' form without selecting a file and saw the
      error shown next to the 'path' field.
    Description From Last Updated

    While here, can we remove the // error comment? It's not useful at all.

    chipx86chipx86

    These can be combined.

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

      While here, can we remove the // error comment? It's not useful at all.

    3. reviewboard/static/rb/js/common.js (Diff revision 1)
       
       
       
      Show all issues

      These can be combined.

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

    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (76caaa7)