Closed (fixed)
Project:
Views Bulk Operations (VBO)
Version:
7.x-3.x-dev
Component:
Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2011 at 13:50 UTC
Updated:
25 Jun 2013 at 10:02 UTC
Сondition:
- table layout;
- use grouping field.
If I check checkbox "select all" in one group of node, then all nodes on page selected. I think it is incorrect action (?). In old version 3.x-dev it's work fine - selected only nodes in group.
Comments
Comment #1
bojanz commentedTrue, it's a bit shaky currently.
Comment #2
bojanz commentedThe question here is how to handle the row that allows you to switch between "select all on this page" and "select all on all pages".
Remove the option to select everything across all pages? Do the row show/hide on every table (group)? Needs some thought. How did old 7.x-3.x handle this?
I think the best option would be to kill that row, and show the same thing you get with a grid view, the box above the results allowing you to select all on the page / on all pages. And have the table checkbox just do the selecting in that particular table.
Comment #3
valante commentedI also need a solution for this. Here's my logic for a grouped view.
Layout:
[1] Select all rows
[2] Group 1
[3] Row 1
[4] Row 2
[5] Group 3
[6] Row 4
[7] Row 5
Some terms to make life easier:
Top-level checkbox: [1]
Group-level checkboxes: [2], [5]
Row-level checkboxes: [3], [4], [6], [7]
Selection type: the value of "this page" / "all pages" row
Overview:
Detailed behavior:
That's it, I think. I hope this makes sense :-)
Comment #4
bojanz commentedGreat analysis valante, I appreciate your thoughts. Thinking the same, except that the top-level box should also have an option to select acros all pages (same widget as when using VBO on a grid view, for example).
Shouldn't take much work, all the pieces are already there, they just need to be tweaked a bit, with a sacrifice to the JS gods.
Comment #5
valante commentedI'll go find a big, fat bull then :-)
Comment #6
bojanz commentedCommitted a fix: http://drupalcode.org/project/views_bulk_operations.git/commitdiff/11523...
Give it a test and let me know if I missed anything. Spare the bull for now :)
Comment #7
valante commentedLOL, you have eternal bovine gratitude.
Ran a preliminary test and it seems to work fine, except for one thing. When a row- or group-level box is unchecked, the change doesn't propagate upwards as it should.
BTW, I could not apply the diff to the beta branch, so I installed the dev version. Is it safe to use in production sites? And if not, is there any chance of committing this fix to the beta branch?
EDIT: The 18% width in .vbo-fieldset-select-all causes the 'select all' text to break over two lines. Please change?
Comment #8
bojanz commentedThere is no beta branch, a beta is just a snapshot of the 7.x-3.x branch (from which -dev is generated each night) at a certain point in time.
Since beta1 I've only committed small fixes, so -dev is perfectly fine for production (7.x-3.x has settled into calm waters mostly).
True, never crossed my mind. It's really minor though. Will give it a fix.
Which value do you recommend?
Comment #9
valante commented@bojanz, thanks for clearing up on the beta/dev issue. I'm not very fluent in GIT.
As for the width value, I guess it really depends on the theme. For me (under the default installation theme), 25% is a good but tight fit. Maybe 30% would be playing it safer.
And if we're talking aesthetics, the text ends up aligned almost to the bottom because of the 25px margin-top in .fieldset-wrapper. Eh, I'm a perfectionist, what can I say.
Comment #10
bojanz commentedOkay, since there are tweaks that can be done, updating the issue status.
Comment #11
bojanz commentedWow, I had no idea that the "select all" widget looked that broken in Bartik / Garland / Stark. Made it sane:
http://drupalcode.org/project/views_bulk_operations.git/commitdiff/e75e4...
http://drupalcode.org/project/views_bulk_operations.git/commitdiff/f4480...
Still don't like the fact that I need !important in there, but it works.
Comment #12
bojanz commentedAlso, this.
http://drupalcode.org/project/views_bulk_operations.git/commitdiff/30fe9...
Comment #13
valante commentedNot sure what I'm doing this time, but I've installed the latest dev version and I don't see any difference in behavior from #6 above.
Comment #14
valante commentedIgnore my #13, it was an unfortunate brain-fart.
I've installed the new dev and I see the changes. Here they are:
1. No top-level select box at all.
2. When I click any group-level select box, it toggles all row-level boxes (but not the other group-level boxes).
3. Unchecking a row-level box does not effect its parent group-level box.
4. No "this page"/"all pages" controls ever appear.
All in all, #6 was closer to the mark.
Comment #15
bojanz commentedAre you sure you didn't install the beta by mistake? That doesn't sound like -dev to me. Please check, just in case.
Also, clear your cache, my changes after #6 were all to CSS and JS, if you're aggregating them, you might not see them without a cache clear.
Comment #16
valante commentedAmazing, two brain-farts in a row.
Sorry, bojanz! Remind me not to build sites when I'm hardly conscious :-)
The new commit works like a charm. I'm still not getting the "this page"/"all pages" line, but probably because I don't have more than one page in the only VBO view I currently have.
Comment #17
bojanz commentedYes, it won't show if you only have one page. Glad to know it works now :)
Comment #19
musa.thomasI've got this issue with Drupal 6 and views 6.30
Comment #20
bojanz commentedThere's already an issue for the D6 version here: #1598458: Selecting group executes action on all rows.
That said, you'll have to supply a patch yourself, VBO for D6 is in maintenance mode.