Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max selected and misc updates #747

Merged
merged 5 commits into from
Feb 11, 2018
Merged

Max selected and misc updates #747

merged 5 commits into from
Feb 11, 2018

Conversation

SteveTheTechie
Copy link
Contributor

@SteveTheTechie SteveTheTechie commented Feb 9, 2018

Addresses #717, Closes #737 and PR #584.

  1. Fix/finish maxSelected functionality.
  2. Fix related test.
  3. Fix namespace period issue.
  4. Add new event triggers requested by open PR Pre check alland check none events #584

1. Fix/finish maxSelected functionality.
2. Fix related test.
3. Fix namespace period issue.
4. Add new event triggers requested by open PR.
@@ -122,7 +122,7 @@
// create a unique namespace for events that the widget
// factory cannot unbind automatically. Use eventNamespace if on
// jQuery UI 1.9+, and otherwise fallback to a custom string.
this._namespaceID = this.eventNamespace || ('multiselect' + multiselectID);
this._namespaceID = this.eventNamespace.slice(1) || ('multiselect' + multiselectID);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mentions that the second condition is for jQuery UI prior to 1.9, can probably just delete it since the widget now requires 1.11.

this._trigger('beforeCheckAll');

var maxSelected = this.options.maxSelected;
if (maxSelected === null || maxSelected > this.$inputs.length) {
Copy link
Collaborator

@mlh758 mlh758 Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to set the checkAllText option to null if maxSelected is set. That way the user just can't press it. It would be a clearer interface for the user interacting with the widget, remove the need for this second check, and we wouldn't need that Check All Not Permitted message.

@SteveTheTechie
Copy link
Contributor Author

@mlh758 changes committed as requested.

@mlh758
Copy link
Collaborator

mlh758 commented Feb 9, 2018

I haven't had a chance to review the whole file yet. I was baking a mountain of cookies last night. I'll try to finish up the review today and get it merged.

@SteveTheTechie
Copy link
Contributor Author

@mlh758 Please let me know if additional changes are required to let you merge this. Thx.

@mlh758
Copy link
Collaborator

mlh758 commented Feb 10, 2018

I checked out your code this morning and it looks like I can no longer click option group labels to select all the items under that group.

@SteveTheTechie
Copy link
Contributor Author

@mlh758 Oops! Sorry. Fixed.

@mlh758 mlh758 merged commit 7142177 into ehynds:version3 Feb 11, 2018
@mlh758
Copy link
Collaborator

mlh758 commented Feb 11, 2018

Looks good now, merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants