Edgewall Software
Modify

Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#9609 closed enhancement (fixed)

'Select All' function on WebAdmin Plugin panel

Reported by: Ryan J Ollos <ryano@…> Owned by: Ryan J Ollos <ryan.j.ollos@…>
Priority: normal Milestone: 1.0.1
Component: admin/web Version: 0.12dev
Severity: normal Keywords: bitesized jquery
Cc: Branch:
Release Notes:

Added a select all checkbox to table of components for each plugin on the Plugins admin panel.

API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

It might be nice to have a Select / Unselect function for each plugin on the Web Admin plugins page. The function would select or unselect all components for a plugin.

This would be particularly useful when disabling plugins for debug purposes, in the case that the plugin has many components.

I'm not particularly sure where the checkbox or button that executes the function would be best placed in the table, but assume that the function could be implemented with some javascript.

Attachments (12)

ManagePluginsTable.png (34.9 KB ) - added by Ryan J Ollos <ryano@…> 14 years ago.
ManagePluginTable.png (36.9 KB ) - added by Ryan J Ollos <ryano@…> 14 years ago.
plugin_components_select_all_variant.png (3.6 KB ) - added by dnedelchev <dbn@…> 14 years ago.
Is this way OK?
plugin_components_select_all_variant2.png (2.1 KB ) - added by dnedelchev <dbn@…> 14 years ago.
Or maybe just replacing the "Enabled" label like here?
t9609-r11061-20120618T0005.patch (3.0 KB ) - added by Ryan J Ollos <ryano@…> 13 years ago.
t9609-r11061-20120618T0010.patch (3.1 KB ) - added by Ryan J Ollos <ryano@…> 13 years ago.
t9609-r11112-1.patch (2.7 KB ) - added by Ryan J Ollos <ryano@…> 12 years ago.
Patch against r11112 of the trunk.
t9609-r11115-1.patch (2.7 KB ) - added by Ryan J Ollos <ryano@…> 12 years ago.
Patch against r11115 of the trunk. Minor refactoring from previous patch.
t9609-r11483-1.patch (3.5 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 12 years ago.
Patch against r11483 of the trunk.
t9609-r11483-2.patch (1.9 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 12 years ago.
Patch against r11483 of the trunk.
t9609-r11483-3.patch (1.8 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 12 years ago.
Patch against r11483 of the trunk.
t9609-r11483-4.patch (1.8 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 12 years ago.
Patch against r11483 of the trunk.

Download all attachments as: .zip

Change History (37)

by Ryan J Ollos <ryano@…>, 14 years ago

Attachment: ManagePluginsTable.png added

by Ryan J Ollos <ryano@…>, 14 years ago

Attachment: ManagePluginTable.png added

comment:1 by Ryan J Ollos <ryano@…>, 14 years ago

I had meant to attach this screen capture.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Christian Boos, 14 years ago

In the second column heading, a simple checkbox after Enabled?

comment:3 by Ryan Ollos <ryano@…>, 14 years ago

I was concerned about making the column too wide by adding a checkbox to the right of Enabled. Another thought was to use some small icons similar to the [+] [-] to the right of Component, but perhaps locate them below Enabled?

comment:4 by Remy Blank, 14 years ago

Milestone: next-major-0.1X

The exact location will probably have to be determined by trial and error, but I like the general idea. Assigning to next-major-0.1X until we have something to try out.

by dnedelchev <dbn@…>, 14 years ago

Is this way OK?

by dnedelchev <dbn@…>, 14 years ago

Or maybe just replacing the "Enabled" label like here?

comment:5 by dnedelchev <dbn@…>, 14 years ago

Or maybe just replacing the "Enabled" label like here? This screenshot is from the query page when th:BatchModifyPlugin is active.

Similarly the check-box in the plugin-components-admin page could just replace the "Edit" label.

It's pretty intuitive so it should not be a problem.

The "Enable" column can't be more elegant I think.

And also it will become language-independent, so it will be with fixed width no matter what is the user interface language.













comment:6 by Ryan Ollos <ryano@…>, 14 years ago

I agree with comment:5 about using the layout like the th:BatchModifyPlugin.

comment:7 by Remy Blank, 14 years ago

Yes, the idea in comment:5 looks nice.

comment:8 by Christian Boos, 14 years ago

Patch?

comment:9 by ryano@…, 13 years ago

Keywords: bitesized added

by Ryan J Ollos <ryano@…>, 13 years ago

by Ryan J Ollos <ryano@…>, 13 years ago

comment:10 by Ryan J Ollos <ryano@…>, 13 years ago

I've attached a patch against r11061 of the trunk. I was hoping to get some feedback since my jQuery is probably not that good, and a lot of it was copy and paste.

I also think the state of the select all checkbox should be determined by the state of the component checkboxes: if all components are selected, the group checkbox should be checked; if only some of the components are selected the select all checkbox should be set to the indeterminate state; and if no components are selected, the select all checkbox is not checked. However this resulted in significantly more code and I don't have it all working yet, so I wanted to check if others thought this was a good idea before continuing.

in reply to:  10 ; comment:11 by Christian Boos, 12 years ago

Replying to Ryan J Ollos <ryano@…>:

I've attached a patch against r11061 of the trunk. I was hoping to get some feedback since my jQuery is probably not that good, and a lot of it was copy and paste.

  • it's small and special purpose enough that you could inline this in admin_plugins.html
  • use .closest("table.listing") instead of .parents("table.listing")
  • be careful with the whitespace, TracDev/CodingStyle also applies for Javascript when possible (e.g. space after comma)

I also think the state of the select all checkbox should be determined by the state of the component checkboxes: if all components are selected, the group checkbox should be checked; if only some of the components are selected the select all checkbox should be set to the indeterminate state;

I think it could be checked as well. The reasoning is that the plugin as a whole is considered to be enabled if at least one of its component is enabled.

by Ryan J Ollos <ryano@…>, 12 years ago

Attachment: t9609-r11112-1.patch added

Patch against r11112 of the trunk.

in reply to:  11 comment:12 by Ryan J Ollos <ryano@…>, 12 years ago

Replying to cboos:

I think it could be checked as well. The reasoning is that the plugin as a whole is considered to be enabled if at least one of its component is enabled.

I'm sure it will need some refactoring, but t9609-r11112-1.patch seems to do the job.

in reply to:  11 ; comment:13 by Ryan J Ollos <ryano@…>, 12 years ago

Replying to cboos:

I think it could be checked as well. The reasoning is that the plugin as a whole is considered to be enabled if at least one of its component is enabled.

Once we get this integrated, a possible TODO would be to add similar checked/indeterminate/unchecked behavior for the group checkboxes used on the batchmodify table.

by Ryan J Ollos <ryano@…>, 12 years ago

Attachment: t9609-r11115-1.patch added

Patch against r11115 of the trunk. Minor refactoring from previous patch.

comment:14 by Ryan J Ollos <ryano@…>, 12 years ago

I refactored the patch a little bit. For JS style guidelines, I studied and tried to pattern it after the code in query.js. I was trying to find some way to chain the insertion of the group toggler HTML and its click behavior, but couldn't find a way to do this cleanly since replaceWith returns the replaced element.

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

Keywords: jquery added

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

Attachment: t9609-r11483-1.patch added

Patch against r11483 of the trunk.

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

Attachment: t9609-r11483-2.patch added

Patch against r11483 of the trunk.

in reply to:  13 comment:16 by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

Replying to Ryan J Ollos <ryano@…>:

Once we get this integrated, a possible TODO would be to add similar checked/indeterminate/unchecked behavior for the group checkboxes used on the batchmodify table.

#10992.

Now that I've spent some more time working with jQuery I can see some issues with the code quality of this patch. I've refreshed the patch in t9609-r11483-2.patch. I'll probably feel the same about this patch if I revisit it in a few months ;)

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

I've revised the patch again after doing some similar work in th:#10741. The changes are:

  • Use the html method on the wrapped th.sel rather than replaceWith so that the th element is not recreated.
  • Minimize complexity of selectors by removing unneeded tr elements and other similar changes.
  • Select by class rather than element type and name.
  • Chain creation of group toggler checkbox and assignment of its event behavior.
  • Keep line width to ⇐ 79 characters per the TracDev/CodingStyle.

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

Attachment: t9609-r11483-3.patch added

Patch against r11483 of the trunk.

comment:18 by Remy Blank, 12 years ago

Milestone: next-major-releases1.1.1
Owner: set to Remy Blank
Status: newassigned

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

Attachment: t9609-r11483-4.patch added

Patch against r11483 of the trunk.

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

In t9609-r11483-4.patch I fixed a line with incorrect indentation.

A feature that I've been looking at adding is temporarily highlighting a row when its checkbox is toggled using jQuery UI's highlight effect. When there are many closely spaced rows and the browser is full-sized on a screen it can be difficult to see which component is being selected for enabled/disable. So far I haven't had any luck getting it to work, and I suspect that is due to the tr's color being transparent, but I'm not entirely sure yet. There is also a workaround required due to #10976.

comment:20 by Remy Blank, 12 years ago

Milestone: 1.1.11.0.1
Resolution: fixed
Status: assignedclosed

Slightly modified t9609-r11483-4.patch applied in [11504] (on 1.0-stable by mistake), together with some tuning of the CSS. The main difference is that I left the "Enabled" text in the header, and placed the "select all" checkbox to its left, with the text being the <label> of the checkbox (so you can click on the text, too).

comment:21 by Remy Blank, 12 years ago

Owner: changed from Remy Blank to Ryan J Ollos <ryano@…>

comment:22 by Remy Blank, 12 years ago

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

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

Release Notes: modified (diff)

in reply to:  19 comment:24 by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

Replying to Ryan J Ollos <ryan.j.ollos@…>:

A feature that I've been looking at adding is temporarily highlighting a row when its checkbox is toggled using jQuery UI's highlight effect. When there are many closely spaced rows and the browser is full-sized on a screen it can be difficult to see which component is being selected for enabled/disable.

I have this working now, and it seems like a small change, but I created a specific ticket for the item: #11052.

comment:25 by Ryan J Ollos, 11 years ago

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