Add support for checkbox columns to the datagrid.

Review Request #5141 — Created Dec. 18, 2013 and submitted

Information

Djblets
master

Reviewers

Add support for checkbox columns to the datagrid.

This introduces CheckboxColumn, which can be used by a datagrid to
handle multiple selection of entries. It will display a checkbox for
every row, as well as a checkbox in the header that, when clicked, will
toggle selection of all the checkboxes in each row.

This is based heavily on on Graeme Coupar's work on
https://reviews.reviewboard.org/r/3796/

Tested with the accompanying change for Review Board. Tested:

  • Toggling individual checkboxes.
  • Toggling the checkbox in the header.
  • Adding/removing the column.
Description From Last Updated

detailed_label should be marked for translation, and we should change ugettext to ugettext_lazy for the import.

daviddavid

Should this have disabled="true" ?

daviddavid
chipx86
david
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 2)
     
     
    Show all issues

    detailed_label should be marked for translation, and we should change ugettext to ugettext_lazy for the import.

    1. By the way, if you have a better idea for this label, I'm all ears.

  3. djblets/datagrid/grids.py (Diff revision 2)
     
     
    Show all issues

    Should this have disabled="true" ?

    1. Could go either way. I tried it as disabled before and it looked a bit more faded than I liked.

      With it enabled, it actually doesn't behave poorly. Clicking it is the same as clicking the label, and the you never see it place a checkmark (at least not on MacOS.. didn't check elsewhere).

    2. OK, if clicking doesn't affect the checkbox, then I'm cool with it.

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...