Edgewall Software
Modify

Opened 8 years ago

Closed 6 years ago

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

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

API 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@…> 8 years ago.
ManagePluginTable.png (36.9 KB ) - added by Ryan J Ollos <ryano@…> 8 years ago.
plugin_components_select_all_variant.png (3.6 KB ) - added by dnedelchev <dbn@…> 8 years ago.
Is this way OK?
plugin_components_select_all_variant2.png (2.1 KB ) - added by dnedelchev <dbn@…> 8 years ago.
Or maybe just replacing the "Enabled" label like here?
t9609-r11061-20120618T0005.patch (3.0 KB ) - added by Ryan J Ollos <ryano@…> 6 years ago.
t9609-r11061-20120618T0010.patch (3.1 KB ) - added by Ryan J Ollos <ryano@…> 6 years ago.
t9609-r11112-1.patch (2.7 KB ) - added by Ryan J Ollos <ryano@…> 6 years ago.
Patch against r11112 of the trunk.
t9609-r11115-1.patch (2.7 KB ) - added by Ryan J Ollos <ryano@…> 6 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@…> 6 years ago.
Patch against r11483 of the trunk.
t9609-r11483-2.patch (1.9 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 6 years ago.
Patch against r11483 of the trunk.
t9609-r11483-3.patch (1.8 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 6 years ago.
Patch against r11483 of the trunk.
t9609-r11483-4.patch (1.8 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 (37)

Changed 8 years ago by Ryan J Ollos <ryano@…>

Attachment: ManagePluginsTable.png added

Changed 8 years ago by Ryan J Ollos <ryano@…>

Attachment: ManagePluginTable.png added

comment:1 Changed 8 years ago by Ryan J Ollos <ryano@…>

I had meant to attach this screen capture.

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

comment:2 Changed 8 years ago by Christian Boos

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

comment:3 Changed 8 years ago by Ryan Ollos <ryano@…>

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

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.

Changed 8 years ago by dnedelchev <dbn@…>

Is this way OK?

Changed 8 years ago by dnedelchev <dbn@…>

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

comment:5 Changed 8 years ago by dnedelchev <dbn@…>

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 Changed 8 years ago by Ryan Ollos <ryano@…>

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

comment:7 Changed 8 years ago by Remy Blank

Yes, the idea in comment:5 looks nice.

comment:8 Changed 8 years ago by Christian Boos

Patch?

comment:9 Changed 6 years ago by ryano@…

Keywords: bitesized added

Changed 6 years ago by Ryan J Ollos <ryano@…>

Changed 6 years ago by Ryan J Ollos <ryano@…>

comment:10 Changed 6 years ago by 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.

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.

comment:11 in reply to:  10 ; Changed 6 years ago by Christian Boos

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.

Changed 6 years ago by Ryan J Ollos <ryano@…>

Attachment: t9609-r11112-1.patch added

Patch against r11112 of the trunk.

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

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.

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

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.

Changed 6 years ago by Ryan J Ollos <ryano@…>

Attachment: t9609-r11115-1.patch added

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

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

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

Keywords: jquery added

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

Attachment: t9609-r11483-1.patch added

Patch against r11483 of the trunk.

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

Attachment: t9609-r11483-2.patch added

Patch against r11483 of the trunk.

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

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

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.

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

Attachment: t9609-r11483-3.patch added

Patch against r11483 of the trunk.

comment:18 Changed 6 years ago by Remy Blank

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

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

Attachment: t9609-r11483-4.patch added

Patch against r11483 of the trunk.

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

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

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

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

comment:22 Changed 6 years ago by Remy Blank

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

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

Release Notes: modified (diff)

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

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 Changed 5 years ago by Ryan J Ollos

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