#9609 closed enhancement (fixed)
'Select All' function on WebAdmin Plugin panel
Reported by: | Owned by: | ||
---|---|---|---|
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 )
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)
Change History (37)
by , 14 years ago
Attachment: | ManagePluginsTable.png added |
---|
by , 14 years ago
Attachment: | ManagePluginTable.png added |
---|
comment:3 by , 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 , 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 , 14 years ago
Attachment: | plugin_components_select_all_variant2.png added |
---|
Or maybe just replacing the "Enabled" label like here?
comment:5 by , 14 years ago
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 , 14 years ago
I agree with comment:5 about using the layout like the th:BatchModifyPlugin.
comment:9 by , 12 years ago
Keywords: | bitesized added |
---|
by , 12 years ago
Attachment: | t9609-r11061-20120618T0005.patch added |
---|
by , 12 years ago
Attachment: | t9609-r11061-20120618T0010.patch added |
---|
follow-up: 11 comment:10 by , 12 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.
follow-ups: 12 13 comment:11 by , 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.
comment:12 by , 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.
follow-up: 16 comment:13 by , 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 , 12 years ago
Attachment: | t9609-r11115-1.patch added |
---|
Patch against r11115 of the trunk. Minor refactoring from previous patch.
comment:14 by , 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 , 12 years ago
Keywords: | jquery added |
---|
comment:16 by , 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 , 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 wrappedth.sel
rather thanreplaceWith
so that theth
element is not recreated. - Minimize complexity of selectors by removing unneeded
tr
elements and other similar changes. - Select by
class
rather than elementtype
andname
. - Chain creation of group toggler checkbox and assignment of its event behavior.
- Keep line width to ⇐ 79 characters per the TracDev/CodingStyle.
comment:18 by , 12 years ago
Milestone: | next-major-releases → 1.1.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
follow-up: 24 comment:19 by , 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 , 12 years ago
Milestone: | 1.1.1 → 1.0.1 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
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 , 12 years ago
Owner: | changed from | to
---|
comment:22 by , 12 years ago
Owner: | changed from | to
---|
comment:23 by , 12 years ago
Release Notes: | modified (diff) |
---|
comment:24 by , 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 , 11 years ago
Description: | modified (diff) |
---|
I had meant to attach this screen capture.