Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/jquery.multiselect.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
var opts = this.options;

// get the multiselect instance
var instance = (this.instance = $(this.element).data('multiselect'));
var instance = (this.instance = $(this.element).data('echMultiselect'));
Copy link
Owner

Choose a reason for hiding this comment

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

Can you change these few lines to something like:

var elem = $(this.element);
var instance = (this.instance = (elem.data("echMultiselect") || elem.data("multiselect")));

So that we can maintain 1.8 compatibility? Then I'll merge. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem. This doesn't actually make it backwards compatible. I tested this with 1.9.0 jQuery along with jQuery UI 1.10.0(newest stuff) and jQuery 1.5.0 along with jQuery UI 1.8.7.


// store header; add filter class so the close/check all/uncheck all links can be positioned correctly
var header = (this.header = instance.menu.find('.ui-multiselect-header').addClass('ui-multiselect-hasfilter'));
Expand Down Expand Up @@ -59,6 +59,7 @@
// only the currently filtered elements are checked
instance._toggleChecked = function(flag, group) {
var $inputs = (group && group.length) ? group : this.labels.find('input');
var _self = this;

// do not include hidden elems if the menu isn't open.
var selector = instance._isOpen ? ':disabled, :hidden' : ':disabled';
Expand Down