Fix some issues with the new file attachment display.

Review Request #6445 — Created Oct. 14, 2014 and submitted

Information

Review Board
master
61d7dfb...

Reviewers

The new Update menu work for file attachments had a couple bugs that
prevented usage on new uploads, and broke tests.

Newly uploaded file attachments had an extra <li> tag, which broke the
tests and resulted in malformed HTML. They also didn't have a
functioning Update menu, since the menus were only ever created on
initial page render.

Existing file attachments had a stray %} in the class. This has
probably been there a while.

The menu could have been fixed with some more global menu registration
stuff, but it ended up getting messy. Instead, I've removed all the old
JS-level menu support, and simply moved it into CSS. Now, the browser
handles the display of menus for us. I also tweaked the animation time
to be a bit quicker and smoother.

To work around the issue of the Update menu sticking around on click
(which didn't work before, due to referencing a different class name,
and still didn't work here with that fixed), I've simply fixed the
z-orders so that the modal dialog overlay appears above the menu. The
menu is still on-screen until the mouse is moved away, but it's not
noticeable.

Played around with the review request menus and attachment menus,
including clicking items. Didn't have any problems.

The related unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/templates/extensions/action_dropdown.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/templates/reviews/review_request_actions_secondary.html
        reviewboard/static/rb/css/defs.less
        reviewboard/static/rb/css/mixins/style.less
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/templates/extensions/action_dropdown.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/templates/reviews/review_request_actions_secondary.html
        reviewboard/static/rb/css/defs.less
        reviewboard/static/rb/css/mixins/style.less
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (3e0ae56)
Loading...