Opened 7 years ago

Closed 7 years ago

#11697 closed (fixed)

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

Reported by: Yuri Baburov Owned by: Yuri Baburov
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 Sean Brant 7 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 Sean Brant 7 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 Sean Brant 7 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 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

Changed 7 years ago by Sean Brant

Attachment: shift-check-multi.diff added

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

comment:2 Changed 7 years ago by Karen Tracey

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 7 years ago by Karen Tracey

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 7 years ago by Jannis Leidel

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 7 years ago by Sean Brant

Attachment: shift-check-multi-2.diff added

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

Changed 7 years ago by Sean Brant

Attachment: shift-check-multi-3.diff added

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

comment:5 Changed 7 years ago by Carl Meyer

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 7 years ago by Sean Brant

Has patch: set

comment:7 Changed 7 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(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