[WIP] Implement front end drag and drop on admin site

Review Request #5448 — Created Feb. 9, 2014 and discarded

Information

Review Board
master

Reviewers

Lets the user drag and drop widgets on the admin site dashboard. Currently does not save the state.

Moved both types of widgets around. Tried invalid drops to make sure nothing strange would happen.

Description From Last Updated

Looks like debug code; this can probably go away.

daviddavid

Can you wrap this comment to fit within 80 columns?

daviddavid

Because masonry is a jQuery plugin, you can chain methods: ui.item.parent() .removeClass('masonry') .masonry('reload');

daviddavid

Looks like debug code; this can probably go away.

daviddavid

You can chain these, too.

daviddavid

Is this change necessary?

daviddavid

Given that this code is only used here, and each of these functions only has one statement, I'm thinking we …

daviddavid

You can chain these, too (so you don't run the selector twice). In general, please try to use single-quotes for …

daviddavid
HE
HE
david
  1. Looks like a great start!

  2. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    Looks like debug code; this can probably go away.

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

    Can you wrap this comment to fit within 80 columns?

  4. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
    Show all issues

    Because masonry is a jQuery plugin, you can chain methods:

    ui.item.parent()
        .removeClass('masonry')
        .masonry('reload');
    
  5. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
     
    Show all issues

    Looks like debug code; this can probably go away.

  6. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
     
     
    Show all issues

    You can chain these, too.

  7. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
    Show all issues

    Is this change necessary?

  8. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
    Show all issues

    Given that this code is only used here, and each of these functions only has one statement, I'm thinking we should keep them inline here (with comments for what each of those statements are doing).

  9. reviewboard/static/rb/js/admin.js (Diff revision 1)
     
     
     
     
     
    Show all issues

    You can chain these, too (so you don't run the selector twice).

    In general, please try to use single-quotes for the strings. I know we're not consistent in all our other code, but I'm trying to work in that direction.

  10. 
      
HE
Review request changed

Status: Discarded

Change Summary:

Old change.
Loading...