Thanks for the "Select all" checkbox! It's very helpful but I think you're missing something:
When you tick the "Select all" checkbox (all checkboxes are now ticked) and then you untick another checkbox, the "Select all" checkbox is still ticked but it should be unticked right? I think that would be better for UX.

Comments

damiankloip’s picture

That would make sense. I may look at a patch for this, my js skills aren't the best though ;)

damiankloip’s picture

Status: Active » Needs review
StatusFileSize
new745 bytes

Ok, here is a patch that works. Whether or not there is a better way to achieve this with javascript, I'm not sure. Open to criticism!

Status: Needs review » Needs work

The last submitted patch, 1442092.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new835 bytes

updated patch

Status: Needs review » Needs work

The last submitted patch, 1442092-3.patch, failed testing.

damiankloip’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Needs work » Needs review
StatusFileSize
new805 bytes

hang on, how did that .not stay in there :) I'm sure I got rid of that. Here is the correct patch.

damiankloip’s picture

That's better, forgot to change issue to the dev branch.

yannickoo’s picture

Status: Needs review » Needs work
StatusFileSize
new808 bytes
+++ b/js/views-admin.jsundefined
@@ -774,6 +774,14 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
+            $('#views-ui-config-item-form div.form-item-options-value-all input[type=checkbox]').attr('checked', 0);

Instead of setting the checked attribute to zero you could remove it with removeAttr().

BTW please check the "Name your patch" section in the Submitting patches in the Patches chapter.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new808 bytes

Ok, Thanks for the js tips, I can always do with some of those :) If we are sticking to the format in that issue maybe it should be like this...

dawehner’s picture

Status: Needs review » Needs work
+++ b/js/views-admin.jsundefined
@@ -774,6 +774,14 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
+            $('#views-ui-config-item-form div.form-item-options-value-all input[type=checkbox]').removeAttr('checked');

Couldn't we reuse the selector from above?

damiankloip’s picture

StatusFileSize
new752 bytes

ok, I think I know what you mean. How about this?

damiankloip’s picture

Status: Needs work » Needs review
damiankloip’s picture

StatusFileSize
new668 bytes

After talking to dawehner on IRC, something more like this maybe? So the code that unchecks the 'all' checkbox is in it's own loop.

dawehner’s picture

Status: Needs review » Fixed

Thanks, committed this version to 7.x-3.x and 8.x-3.x, hopefully noone will complain about the different behaviour,
but i prefer personally the new one.

damiankloip’s picture

New one is much better :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.