Commit 6f5b993b authored by David Stutz's avatar David Stutz

Added example for select all performance.

parent 8d803bd2
......@@ -193,6 +193,15 @@
$('#example41').multiselect({
includeSelectAllOption: true
});
for (var i = 1; i < 1000; i++) {
$('#example45').append('<option value="' + i + '">Option ' + i + '</option>');
}
$('#example45').multiselect({
includeSelectAllOption: true,
maxHeight: 150
});
});
</script>
<p>
......@@ -267,6 +276,14 @@
The 'Select all' option automatically repsonds to the selection of the user. In particular, it responds to the initial state of the select.
</td>
</tr>
<tr>
<td>
<select id="example45" multiple="multiple"></select>
</td>
<td>
Test the performance of the 'Select all' option with 999 options.
</td>
</tr>
<tr>
<td>
<select id="example3" multiple="multiple">
......
......@@ -203,6 +203,15 @@
alert('Dropdown hidden ...');
}
});
for (var i = 1; i < 1000; i++) {
$('#example45').append('<option value="' + i + '">Option ' + i + '</option>');
}
$('#example45').multiselect({
includeSelectAllOption: true,
maxHeight: 150
});
});
</script>
<p>
......@@ -277,6 +286,14 @@
The 'Select all' option automatically repsonds to the selection of the user. In particular, it responds to the initial state of the select.
</td>
</tr>
<tr>
<td>
<select id="example45" multiple="multiple"></select>
</td>
<td>
Test the performance of the 'Select all' option with 999 options.
</td>
</tr>
<tr>
<td>
<select id="example3" multiple="multiple">
......
......@@ -346,9 +346,9 @@
if (isSelectAllOption) {
var values = [];
// Select the visible checkboxes except the "select-all" and possible divider.
var availableInputs = $('li input[value!="' + this.options.selectAllValue + '"][data-role!="divider"]', this.$ul).filter(':visible');
for (var i = 0, j = availableInputs.length; i < j; i++) {
values.push(availableInputs[i].value);
}
......
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