Commit ee5b93ff authored by Ponomarev Nikolay's avatar Ponomarev Nikolay

Adding select-all performance

parent ea8416e4
......@@ -238,10 +238,17 @@
// Toggle all options if the select all option was changed.
if (isSelectAllOption) {
$checkboxesNotThis.filter(function() {
return $(this).is(':checked') != checked;
}).trigger('click');
}
if (this.$select[0][0].value == this.options.selectAllValue) {
var values = [];
var options = this.$select.children();
for(var i = 0; i < $checkboxesNotThis.length; i++) {
if (options[i].value !== this.options.selectAllValue) {
values.push(options[i].value);
}
}
checked ? this.select(values) : this.deselect(values)
}
}
if (checked) {
$option.prop('selected', true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment