Problem/Motivation
1. Create a node view
Routine1:
Step1: Add filter Content: Type. Now you can see the following image.

Step2: When we click Select All option, my all content type get checked.

Step3: When we uncheck the Article option, Select All option also get unchecked.

Step4: Once again i check Article option, now all the two content type in check status, but Select All option still in Unchecked state.

Routine2:
Now do the Step1 once again. You can see the following image.

Step5: Check the Article and the Basic page option. But still Select All option in uncheck state.

Issue: Select All functionality need to review.
Proposed resolution
To be determined.
Remaining tasks
To be determined.
User interface changes
Not Applicable.
API changes
Not Applicable.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | core-viewsui-selectall-1967800-15.patch | 1.51 KB | nod_ |
| #13 | core-viewsui-selectall-1967800-11.patch | 1.51 KB | nod_ |
| #10 | vdc-1967800-10.patch | 1.52 KB | dawehner |
| #2 | views_ui-1967800-1.patch | 1.47 KB | vineet.osscube |
| still_uncheck_select_all.png | 115.79 KB | sarav.din33 |
Comments
Comment #1
vineet.osscube commentedAssigned
Comment #2
vineet.osscube commentedSo initial patch for first review :)-
Comment #3
aspilicious commentedAdding vdc tag
Comment #4
sarav.din33 commentedI applied #2 patch. It working fine. @vineet.osscube Thanks for this patch.
Comment #5
sarav.din33 commentedI applied #2 patch. Its working fine. @vineet.osscube thanks for this patch.
Comment #6
tim.plunkettI'm unsure about the attr/prop switch, asking for a second opinion.
Also the comments are misformatted.
Comment #7
andymartha commentedIf Drupal 8 is shipping with Jquery >= 1.6, it should be prop. Attr is a legacy term for all Jquery. However, I thought the form was $("#domelement").prop("checked", true) rather than "checked" checked. I might have to look that one up again to verify.
Comment #8
nod_does not pass JSHint validation.
We don't use .size(), just .length directly.
also the code can be changed to have only one select of $('.form-type-checkboxes:visible').find('input[type=checkbox]') and filter that afterwards for visible items only. Haven't checked the HTML but i hope there is a more specific selector so we don't need the checkbox - 1.
.prop() use in the patch is correct though.
Comment #9
nod_Comment #10
dawehnerComment #11
nod_#2012142: Update to jQuery 2.0.3 and rerolled.
Changed a bit the logic for checking the select all, Instead of substracting total number of checkboxes with numbe rof checked ones. I'm directly getting the number of unchecked checkboxes (excluding the select all checkbox) if that's 0, select all is checked. Pretty much the same, it's just one DOM selection less.
Comment #12
jibranPatch missing.
Comment #13
nod_loool
Comment #14
jibranI think we have replaced all the parents call with closest in core.
Comment #15
nod_Comment #16
spleshkaShould we change this to
var checked = $(this).prop('checked');?As far as I know, input[type="checkbox"] should work slightly faster, because in this case jquery will call querySelectorAll() that uses browser tools for elements searching, while the second variant will grep all elements using jQuery. But the results will be the same.
Possibly, we need to use context here?
Comment #23
avpadernoComment #27
pameeela commentedUpdated issue summary.
Comment #31
gumnut commentedThis issue was discussed at the code sprint and we agree its not a bug as "Select All" is way to select all the options not a state of the selections