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.

Comments

vineet.osscube’s picture

Assigned: Unassigned » vineet.osscube

Assigned

vineet.osscube’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

So initial patch for first review :)-

aspilicious’s picture

Issue tags: +VDC

Adding vdc tag

sarav.din33’s picture

Status: Needs review » Reviewed & tested by the community

I applied #2 patch. It working fine. @vineet.osscube Thanks for this patch.

sarav.din33’s picture

I applied #2 patch. Its working fine. @vineet.osscube thanks for this patch.

tim.plunkett’s picture

Assigned: vineet.osscube » nod_
Status: Reviewed & tested by the community » Needs review
Issue tags: +JavaScript

I'm unsure about the attr/prop switch, asking for a second opinion.

Also the comments are misformatted.

andymartha’s picture

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

nod_’s picture

Status: Needs review » Needs work

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.

nod_’s picture

Assigned: nod_ » Unassigned
dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new1.52 KB
  • Used a different selector
  • Adapted some comments.
nod_’s picture

Priority: Minor » Normal

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

jibran’s picture

Status: Needs review » Needs work

Patch missing.

nod_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.51 KB

loool

jibran’s picture

Status: Needs review » Needs work
@@ -769,17 +769,20 @@ Drupal.behaviors.viewsFilterConfigSelectAll = {
+        $(this).parents('.form-checkboxes').find('input[type=checkbox]').prop('checked', checked);

I think we have replaced all the parents call with closest in core.

nod_’s picture

Status: Needs work » Needs review
StatusFileSize
new1.51 KB
spleshka’s picture

Status: Needs review » Needs work
  var checked = $(this).is(':checked');

Should we change this to var checked = $(this).prop('checked'); ?

   $(this).closest('.form-checkboxes').find('input[type=checkbox]').prop('checked', 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.

  var unchecked = $('.form-item-options-value:visible').find('input[type=checkbox]').not(':checked, #edit-options-value-all').length;

Possibly, we need to use context here?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

avpaderno’s picture

Version: 8.6.x-dev » 8.9.x-dev
Issue summary: View changes
Issue tags: -JavaScript +JavaScript

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

pameeela’s picture

Title: Views UI filter checkboxes: Issue » 'Select all' in exposed filter settings should be checked if all values are checked
Issue summary: View changes
Priority: Normal » Minor
Issue tags: +Bug Smash Initiative

Updated issue summary.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gumnut’s picture

Status: Needs work » Closed (works as designed)

This 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