Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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:
Release Notes:

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

API 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@…> 6 years ago.
Patch against r11483 of the trunk.

Download all attachments as: .zip

Change History (14)

Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Attachment: t10992-r11483-1.patch added

Patch against r11483 of the trunk.

comment:1 Changed 6 years ago by Remy Blank

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

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

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 Changed 6 years ago by Remy Blank

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 Changed 6 years ago by Remy Blank

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 Changed 6 years ago by Remy Blank

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

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

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 Changed 6 years ago by Christian Boos

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).

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

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

comment:9 in reply to:  8 Changed 6 years ago by Christian Boos

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

Yes, there is a ticket about that — #10144

Thanks a lot, yes that was it.

comment:10 Changed 6 years ago by Christian Boos

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 Changed 6 years ago by Ryan J Ollos <ryan.j.ollos@…>

Sure, I will do that later this evening.

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

Release Notes: modified (diff)

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

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.
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.