Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10992 closed enhancement (fixed)

Add tri-state behavior to the batch modify group togglers

Reported by: Ryan J Ollos <ryan.j.ollos@…> Owned by: Ryan J Ollos <ryan.j.ollos@…>
Priority: normal Milestone: 1.0.1
Component: ticket system Version:
Severity: normal Keywords: batch-modify
Cc: Branch:
Release Notes:

The BatchModify select-all checkboxes are toggled with tri-state behavior when the ticket checkboxes are toggled.

API Changes:
Internal Changes:

Description

The attached patch causes the group toggler to change state when the grouped toggle checkboxes are selected. The group toggler code is also refactored.

Mentioned in comment:13:ticket:9609.

Attachments (1)

t10992-r11483-1.patch (1.3 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 11 years ago.
Patch against r11483 of the trunk.

Download all attachments as: .zip

Change History (14)

by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Attachment: t10992-r11483-1.patch added

Patch against r11483 of the trunk.

comment:1 by Remy Blank, 11 years ago

Milestone: 1.0.1
Owner: set to Remy Blank
Status: newassigned

comment:2 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Two comments related to this patch:

  • I'm not entirely confident about my use of closest rather than parents. cboos suggested I use closest in comment:11:ticket:9609, but I don't have the use cases entirely sorted out in my mind.
  • The jQuery documentation for prop suggests that method should be used rather than attr for changing the checked property, which motivated the changes attr("checked", this.checked)prop("checked", this.checked).

comment:3 by Remy Blank, 11 years ago

closest is fine, however you need to match both <thead> and <tbody>, as only the first group is a <thead>. I have fixed it here already. The use of prop is good.

comment:4 by Remy Blank, 11 years ago

Resolution: fixed
Status: assignedclosed

Slightly fixed patch applied in [11505], together with a small optimization in the same code in the plugin admin panel. (There must be a way to combine both implementations into a generically-usable function, but it wasn't immediately obvious, so I left it at that.)

comment:5 by Remy Blank, 11 years ago

Owner: changed from Remy Blank to Ryan J Ollos <ryan.j.ollos@…>

in reply to:  4 comment:6 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Replying to rblank:

(There must be a way to combine both implementations into a generically-usable function, but it wasn't immediately obvious, so I left it at that.)

It hasn't been obvious to me how to accomplish this either, but I've had it on my todo list so that the select all functionality could also easily be added to some of the admin panels that have tables. I can look into make this change as part of #10994.

comment:7 by Christian Boos, 11 years ago

Note that this tri-state behavior would probably be very useful for the repository filter in the timeline… I was 99% sure we had a ticket about the current behavior of this filter being somewhat confusing, but I can't find it anymore (#8758 is only the original enhancement request ticket).

in reply to:  7 ; comment:8 by Ethan Jucovy <ethan.jucovy@…>, 11 years ago

Replying to cboos:

Note that this tri-state behavior would probably be very useful for the repository filter in the timeline… I was 99% sure we had a ticket about the current behavior of this filter being somewhat confusing, but I can't find it anymore (#8758 is only the original enhancement request ticket).

Yes, there is a ticket about that — #10144

in reply to:  8 comment:9 by Christian Boos, 11 years ago

Replying to Ethan Jucovy <ethan.jucovy@…>:

Yes, there is a ticket about that — #10144

Thanks a lot, yes that was it.

comment:10 by Christian Boos, 11 years ago

Keywords: batch-modify added

Ryan, would you mind updating the Release Notes: and API Changes: fields (as appropriate) of the tickets you contributed?.

comment:11 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Sure, I will do that later this evening.

comment:12 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Release Notes: modified (diff)

comment:13 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos <ryan.j.ollos@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos <ryan.j.ollos@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.