Opened 6 years ago

Closed 5 years ago

#11697 closed (fixed)

Select multiple action checkboxes with shift+mouseclick in django admin (like in gmail)

Reported by: buriy Owned by: buriy
Component: contrib.admin Version: 1.1
Severity: Keywords: admin actions shift select gmail
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Solution is described here: http://stackoverflow.com/questions/659508/how-can-i-shift-select-multiple-checkboxes-like-gmail

It needs to be adopted into django admin's action_checkbox field and actions.js script.

I'll create a patch asap, or someone else might want to do this.

Attachments (3)

shift-check-multi.diff (1.8 KB) - added by seanbrant 5 years ago.
This adds support for shift-clicking checkboxes to select items in a range
shift-check-multi-2.diff (1.9 KB) - added by seanbrant 5 years ago.
Fixes the x of y and the shift-click the first item issue
shift-check-multi-3.diff (2.4 KB) - added by seanbrant 5 years ago.
this patch will automatically select/deselect the check all if you select all with shift-click

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by seanbrant

This adds support for shift-clicking checkboxes to select items in a range

comment:2 Changed 5 years ago by kmtracey

Noticed a couple of things playing with this on Ubuntu/Firefox. First, if I happen to hold down shift for the first thing I check, every item from there to the bottom gets selected. I found that surprising. Second the x of y objects selected isn't matching reality when a range is selected. It seems to be counting all the items selected via a shift-click as just one.

comment:3 Changed 5 years ago by kmtracey

Tested with IE8 and Chrome on Windows also. Both also show the behavior of selecting every item to the bottom of the list if shift is held for the first click. Oddly, IE8 counts properly, always reporting how many items are actually selected. Chrome is behaving like Firefox and seeming to count only one item when a shift-click selects multiple.

comment:4 Changed 5 years ago by jezdez

Maby combining the two events into one (Actions.counter() and checking for shift-clicking) might negate the the problems with the x of y objects.

Changed 5 years ago by seanbrant

Fixes the x of y and the shift-click the first item issue

Changed 5 years ago by seanbrant

this patch will automatically select/deselect the check all if you select all with shift-click

comment:5 Changed 5 years ago by carljm

Works great for me in Firefox 3.0 on Ubuntu, and on WinXP VM: FF 3.5, Opera 10.10, Safari 3.0.3, Chrome 3.0.195.38, and IE 8.

comment:6 Changed 5 years ago by seanbrant

  • Has patch set

comment:7 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(In [12155]) Fixed #11697 - Allow shift clicking for selecting multiple action checkboxes in the admin changelist. Thanks buriy and Sean Brant.

Note: See TracTickets for help on using tickets.
Back to Top